|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Message
org.restlet.Request
org.restlet.util.WrapperRequest
public class WrapperRequest
Request wrapper. Useful for application developer who need to enrich the request with application related properties and behavior.
| Constructor Summary | |
|---|---|
WrapperRequest(Request wrappedRequest)
Constructor. |
|
| Method Summary | |
|---|---|
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. |
ConcurrentMap<String,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. |
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 |
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(String value,
MediaType mediaType)
Sets a textual entity. |
void |
setHostRef(Reference hostRef)
Sets the host reference. |
void |
setHostRef(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(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(String referrerUri)
Sets the referrer reference if available using an URI string. |
void |
setResourceRef(Reference resourceRef)
Sets the target resource reference. |
void |
setResourceRef(String resourceUri)
Sets the target resource reference using an URI string. |
void |
setRootRef(Reference rootRef)
Sets the application root reference. |
String |
toString()
Displays a synthesis of the request like an HTTP request line. |
| Methods inherited from class org.restlet.Request |
|---|
getCurrent, isLoggable, setLoggable |
| Methods inherited from class org.restlet.Message |
|---|
getCacheDirectives, getDate, getEntityAsText, getOnError, getOnSent, getRecipientsInfo, getWarnings, release, setAttributes, setCacheDirectives, setDate, setOnError, setOnSent, setRecipientsInfo, setWarnings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WrapperRequest(Request wrappedRequest)
wrappedRequest - The wrapped request.| Method Detail |
|---|
public boolean abort()
Request
abort in class Requestpublic void commit(Response response)
Request
commit in class Requestpublic ConcurrentMap<String,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()
getEntity in class Messagepublic Reference getHostRef()
getHostRef in class Requestpublic int getMaxForwards()
Request
getMaxForwards in class Requestpublic Method getMethod()
getMethod in class Requestpublic Uniform getOnResponse()
Request
getOnResponse 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 List<Range> getRanges()
Request
getRanges in class 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 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()
Request
isExpectingResponse 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)
Request
setClientInfo in class RequestclientInfo - The client-specific information.public void setConditions(Conditions conditions)
Request
setConditions in class Requestconditions - The conditions applying to this request.public void setCookies(Series<Cookie> cookies)
Request
setCookies in class Requestcookies - A series of cookies provided by the client.public void setEntity(Representation entity)
setEntity in class Messageentity - The entity representation.
public void setEntity(String value,
MediaType mediaType)
setEntity in class Messagevalue - The represented string.mediaType - The representation's media type.public void setHostRef(Reference hostRef)
setHostRef in class RequesthostRef - The host reference.public void setHostRef(String hostUri)
setHostRef in class RequesthostUri - The host URI.public void setMaxForwards(int maxForwards)
Request
setMaxForwards in class RequestmaxForwards - The maximum number of intermediaries.public void setMethod(Method method)
setMethod in class Requestmethod - The method called.public void setOnResponse(Uniform onResponseCallback)
Request
setOnResponse in class RequestonResponseCallback - The callback invoked on response reception.public void setOriginalRef(Reference originalRef)
Request
setOriginalRef in class RequestoriginalRef - The original reference.Request.getOriginalRef()public void setProtocol(Protocol protocol)
Request
setProtocol 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(List<Range> ranges)
Request
setRanges in class Requestranges - A list of ranges.public void setReferrerRef(Reference referrerRef)
setReferrerRef in class RequestreferrerRef - The referrer reference.public void setReferrerRef(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(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 String toString()
Request
toString in class Request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||