public class WrapperRequest extends Request
| Constructor and Description |
|---|
WrapperRequest(Request wrappedRequest)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Ask the connector to attempt to abort the related network connection, for
example immediately closing the socket.
|
void |
commit(Response response)
Asks the server connector to immediately commit the given response
associated to this request, making it ready to be sent back to the
client.
|
java.util.Set<java.lang.String> |
getAccessControlRequestHeaders()
Returns the access control request headers of the target resource.
|
Method |
getAccessControlRequestMethod()
Returns the access control request method of the target resource.
|
java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> |
getAttributes()
Returns a modifiable attributes map that can be used by developers to
save information relative to the message.
|
ChallengeResponse |
getChallengeResponse()
Returns the authentication response sent by a client to an origin server.
|
ClientInfo |
getClientInfo()
Returns the client-specific information.
|
Conditions |
getConditions()
Returns the conditions applying to this call.
|
Series<Cookie> |
getCookies()
Returns the cookies provided by the client.
|
Representation |
getEntity()
Returns the entity representation.
|
Reference |
getHostRef()
Returns the host reference.
|
int |
getMaxForwards()
Returns the maximum number of intermediaries.
|
Method |
getMethod()
Returns the method.
|
Uniform |
getOnResponse()
Returns the callback invoked on response reception.
|
Reference |
getOriginalRef()
Returns the original reference as requested by the client.
|
Protocol |
getProtocol()
Returns the protocol by first returning the baseRef.schemeProtocol
property if it is set, or the resourceRef.schemeProtocol property
otherwise.
|
ChallengeResponse |
getProxyChallengeResponse()
Returns the authentication response sent by a client to a proxy.
|
java.util.List<Range> |
getRanges()
Returns the ranges to return from the target resource's representation.
|
Reference |
getReferrerRef()
Returns the referrer reference if available.
|
Reference |
getResourceRef()
Returns the reference of the target resource.
|
Reference |
getRootRef()
Returns the application root reference.
|
protected Request |
getWrappedRequest()
Returns the wrapped request.
|
boolean |
isAsynchronous()
Indicates if the request is asynchronous.
|
boolean |
isConfidential()
Indicates if the call came over a confidential channel such as an
SSL-secured connection.
|
boolean |
isEntityAvailable()
Indicates if a content is available and can be sent.
|
boolean |
isExpectingResponse()
Indicates if an associated response is expected.
|
boolean |
isSynchronous()
Indicates if the request is synchronous.
|
void |
setAccessControlRequestHeaders(java.util.Set<java.lang.String> accessControlRequestHeaders)
Sets the access control request headers of the target resource.
|
void |
setAccessControlRequestMethod(Method accessControlRequestMethod)
Sets the access control request method of the target resource.
|
void |
setChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to an origin server.
|
void |
setClientInfo(ClientInfo clientInfo)
Sets the client-specific information.
|
void |
setConditions(Conditions conditions)
Sets the conditions applying to this request.
|
void |
setCookies(Series<Cookie> cookies)
Sets the modifiable series of cookies provided by the client.
|
void |
setEntity(Representation entity)
Sets the entity representation.
|
void |
setEntity(java.lang.String value,
MediaType mediaType)
Sets a textual entity.
|
void |
setHostRef(Reference hostRef)
Sets the host reference.
|
void |
setHostRef(java.lang.String hostUri)
Sets the host reference using an URI string.
|
void |
setMaxForwards(int maxForwards)
Sets the maximum number of intermediaries.
|
void |
setMethod(Method method)
Sets the method called.
|
void |
setOnResponse(Uniform onResponseCallback)
Sets the callback invoked on response reception.
|
void |
setOriginalRef(Reference originalRef)
Sets the original reference requested by the client.
|
void |
setProtocol(Protocol protocol)
Sets the protocol used or to be used.
|
void |
setProxyChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to a proxy.
|
void |
setRanges(java.util.List<Range> ranges)
Sets the modifiable list of ranges to return from the target resource's
representation.
|
void |
setReferrerRef(Reference referrerRef)
Sets the referrer reference if available.
|
void |
setReferrerRef(java.lang.String referrerUri)
Sets the referrer reference if available using an URI string.
|
void |
setResourceRef(Reference resourceRef)
Sets the target resource reference.
|
void |
setResourceRef(java.lang.String resourceUri)
Sets the target resource reference using an URI string.
|
void |
setRootRef(Reference rootRef)
Sets the application root reference.
|
java.lang.String |
toString()
Displays a synthesis of the request like an HTTP request line.
|
getCurrent, isLoggable, setLoggablebufferEntity, flushBuffers, getCacheDirectives, getDate, getEntityAsText, getHeaders, getOnError, getOnSent, getRecipientsInfo, getWarnings, release, setAttributes, setCacheDirectives, setDate, setOnError, setOnSent, setRecipientsInfo, setWarningspublic WrapperRequest(Request wrappedRequest)
wrappedRequest - The wrapped request.public boolean abort()
Requestpublic void commit(Response response)
Requestpublic java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> getAttributes()
| Attribute name | Class name | Description |
|---|---|---|
| org.restlet.http.headers | org.restlet.data.Form | Server HTTP connectors must provide all request headers and client HTTP connectors must provide all response headers, exactly as they were received. In addition, developers can also use this attribute to specify non-standard headers that should be added to the request or to the response. |
getAttributes in class Messagepublic ChallengeResponse getChallengeResponse()
getChallengeResponse in class Requestpublic ClientInfo getClientInfo()
getClientInfo in class Requestpublic Conditions getConditions()
getConditions in class Requestpublic Series<Cookie> getCookies()
getCookies in class Requestpublic Representation getEntity()
public Reference getHostRef()
getHostRef in class Requestpublic int getMaxForwards()
RequestgetMaxForwards in class Requestpublic Method getMethod()
public Uniform getOnResponse()
RequestgetOnResponse in class Requestpublic Reference getOriginalRef()
RequestRequest.getResourceRef() method for details.getOriginalRef in class RequestRequest.getResourceRef()public Protocol getProtocol()
getProtocol in class Requestpublic ChallengeResponse getProxyChallengeResponse()
getProxyChallengeResponse in class Requestpublic java.util.List<Range> getRanges()
Requestpublic Reference getReferrerRef()
getReferrerRef in class Requestpublic Reference getResourceRef()
getResourceRef in class RequestRequest.getOriginalRef(),
Request.getHostRef()public Reference getRootRef()
getRootRef in class Requestprotected Request getWrappedRequest()
public java.util.Set<java.lang.String> getAccessControlRequestHeaders()
getAccessControlRequestHeaders in class Requestpublic Method getAccessControlRequestMethod()
getAccessControlRequestMethod in class Requestpublic boolean isAsynchronous()
RequestRequest.getOnResponse() method returns a callback object.isAsynchronous in class Requestpublic boolean isConfidential()
isConfidential in class Requestpublic boolean isEntityAvailable()
isEntityAvailable in class Requestpublic boolean isExpectingResponse()
RequestisExpectingResponse in class Requestpublic boolean isSynchronous()
RequestRequest.getOnResponse() method returns null.isSynchronous in class Requestpublic void setChallengeResponse(ChallengeResponse response)
setChallengeResponse in class Requestresponse - The authentication response sent by a client to an origin
server.public void setClientInfo(ClientInfo clientInfo)
RequestsetClientInfo in class RequestclientInfo - The client-specific information.public void setConditions(Conditions conditions)
RequestsetConditions in class Requestconditions - The conditions applying to this request.public void setCookies(Series<Cookie> cookies)
RequestsetCookies in class Requestcookies - A series of cookies provided by the client.public void setEntity(Representation entity)
public void setEntity(java.lang.String value,
MediaType mediaType)
public void setHostRef(Reference hostRef)
setHostRef in class RequesthostRef - The host reference.public void setHostRef(java.lang.String hostUri)
setHostRef in class RequesthostUri - The host URI.public void setMaxForwards(int maxForwards)
RequestsetMaxForwards in class RequestmaxForwards - The maximum number of intermediaries.public void setMethod(Method method)
public void setOnResponse(Uniform onResponseCallback)
RequestsetOnResponse in class RequestonResponseCallback - The callback invoked on response reception.public void setOriginalRef(Reference originalRef)
RequestsetOriginalRef in class RequestoriginalRef - The original reference.Request.getOriginalRef()public void setProtocol(Protocol protocol)
RequestsetProtocol in class Requestprotocol - The protocol used or to be used.public void setProxyChallengeResponse(ChallengeResponse response)
setProxyChallengeResponse in class Requestresponse - The authentication response sent by a client to a proxy.public void setRanges(java.util.List<Range> ranges)
Requestpublic void setReferrerRef(Reference referrerRef)
setReferrerRef in class RequestreferrerRef - The referrer reference.public void setReferrerRef(java.lang.String referrerUri)
setReferrerRef in class RequestreferrerUri - The referrer URI.Request.setReferrerRef(Reference)public void setResourceRef(Reference resourceRef)
setResourceRef in class RequestresourceRef - The resource reference.Request.getResourceRef()public void setResourceRef(java.lang.String resourceUri)
setResourceRef in class RequestresourceUri - The resource URI.Request.setResourceRef(Reference)public void setRootRef(Reference rootRef)
setRootRef in class RequestrootRef - The application root reference.public void setAccessControlRequestHeaders(java.util.Set<java.lang.String> accessControlRequestHeaders)
setAccessControlRequestHeaders in class RequestaccessControlRequestHeaders - The access control request headers of the target resource.public void setAccessControlRequestMethod(Method accessControlRequestMethod)
setAccessControlRequestMethod in class RequestaccessControlRequestMethod - The access control request method of the target resource.Copyright © 2005-2024 Restlet.