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.
|
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 |
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.
|
isLoggable, setLoggable
flushBuffers, getCacheDirectives, getDate, getHeaders, getOnError, getOnSent, getRecipientsInfo, getWarnings, release, setAttributes, setCacheDirectives, setDate, setOnError, setOnSent, setRecipientsInfo, setWarnings
public WrapperRequest(Request wrappedRequest)
wrappedRequest
- The wrapped request.public boolean abort()
Request
public void commit(Response response)
Request
public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> getAttributes()
Attribute name | Class name | Description |
---|---|---|
org.restlet.client.http.headers | org.restlet.client.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 Message
public ChallengeResponse getChallengeResponse()
getChallengeResponse
in class Request
public ClientInfo getClientInfo()
getClientInfo
in class Request
public Conditions getConditions()
getConditions
in class Request
public Series<Cookie> getCookies()
getCookies
in class Request
public Representation getEntity()
public Reference getHostRef()
getHostRef
in class Request
public int getMaxForwards()
Request
getMaxForwards
in class Request
public Method getMethod()
public Uniform getOnResponse()
Request
getOnResponse
in class Request
public Reference getOriginalRef()
Request
Request.getResourceRef()
method for details.getOriginalRef
in class Request
Request.getResourceRef()
public Protocol getProtocol()
getProtocol
in class Request
public java.util.List<Range> getRanges()
Request
public Reference getReferrerRef()
getReferrerRef
in class Request
public Reference getResourceRef()
getResourceRef
in class Request
Request.getOriginalRef()
,
Request.getHostRef()
public Reference getRootRef()
getRootRef
in class Request
protected Request getWrappedRequest()
public java.util.Set<java.lang.String> getAccessControlRequestHeaders()
getAccessControlRequestHeaders
in class Request
public Method getAccessControlRequestMethod()
getAccessControlRequestMethod
in class Request
public boolean isAsynchronous()
Request
Request.getOnResponse()
method returns a callback object.isAsynchronous
in class Request
public boolean isConfidential()
isConfidential
in class Request
public boolean isEntityAvailable()
isEntityAvailable
in class Request
public boolean isExpectingResponse()
Request
isExpectingResponse
in class Request
public boolean isSynchronous()
Request
Request.getOnResponse()
method returns null.isSynchronous
in class Request
public void setChallengeResponse(ChallengeResponse response)
setChallengeResponse
in class Request
response
- The authentication response sent by a client to an origin
server.public void setClientInfo(ClientInfo clientInfo)
Request
setClientInfo
in class Request
clientInfo
- The client-specific information.public void setConditions(Conditions conditions)
Request
setConditions
in class Request
conditions
- The conditions applying to this request.public void setCookies(Series<Cookie> cookies)
Request
setCookies
in class Request
cookies
- 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 Request
hostRef
- The host reference.public void setHostRef(java.lang.String hostUri)
setHostRef
in class Request
hostUri
- The host URI.public void setMaxForwards(int maxForwards)
Request
setMaxForwards
in class Request
maxForwards
- The maximum number of intermediaries.public void setMethod(Method method)
public void setOnResponse(Uniform onResponseCallback)
Request
setOnResponse
in class Request
onResponseCallback
- The callback invoked on response reception.public void setOriginalRef(Reference originalRef)
Request
setOriginalRef
in class Request
originalRef
- The original reference.Request.getOriginalRef()
public void setProtocol(Protocol protocol)
Request
setProtocol
in class Request
protocol
- The protocol used or to be used.public void setRanges(java.util.List<Range> ranges)
Request
public void setReferrerRef(Reference referrerRef)
setReferrerRef
in class Request
referrerRef
- The referrer reference.public void setReferrerRef(java.lang.String referrerUri)
setReferrerRef
in class Request
referrerUri
- The referrer URI.Request.setReferrerRef(Reference)
public void setResourceRef(Reference resourceRef)
setResourceRef
in class Request
resourceRef
- The resource reference.Request.getResourceRef()
public void setResourceRef(java.lang.String resourceUri)
setResourceRef
in class Request
resourceUri
- The resource URI.Request.setResourceRef(Reference)
public void setRootRef(Reference rootRef)
setRootRef
in class Request
rootRef
- The application root reference.public void setAccessControlRequestHeaders(java.util.Set<java.lang.String> accessControlRequestHeaders)
setAccessControlRequestHeaders
in class Request
accessControlRequestHeaders
- The access control request headers of the target resource.public void setAccessControlRequestMethod(Method accessControlRequestMethod)
setAccessControlRequestMethod
in class Request
accessControlRequestMethod
- The access control request method of the target resource.Copyright © 2005-2024 Restlet.