|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.data.Message
org.restlet.data.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 | |
|---|---|
Map<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. |
DomRepresentation |
getEntityAsDom()
Returns the entity as a DOM representation. This method can be called several times and will always return the same representation instance. |
Form |
getEntityAsForm()
Returns the entity as a DOM representation. Note that this triggers the parsing of the entity into a reusable DOM document stored in memory. This method and the related getEntity*() methods can only be invoked once. |
Object |
getEntityAsObject()
Deprecated. Since 1.1, the ConverterService is deprecated, with no replacement as it doesn't fit well with content negotiation. Most users prefer to handle those conversion in Resource subclasses. |
SaxRepresentation |
getEntityAsSax()
Returns the entity as a SAX representation. Note that this kind of representation can only be parsed once. |
Reference |
getHostRef()
Returns the host reference. |
Method |
getMethod()
Returns the method. |
Protocol |
getProtocol()
Returns the protocol by first returning the baseRef.schemeProtocol property if it is set, or the resourceRef.schemeProtocol property otherwise. |
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 |
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. |
void |
setChallengeResponse(ChallengeResponse response)
Sets the authentication response sent by a client to an origin server. |
void |
setConfidential(boolean confidential)
Indicates if the call came over a confidential channel such as an SSL-secured connection. |
void |
setEntity(Object object)
Deprecated. Since 1.1, the ConverterService is deprecated, with no replacement as it doesn't fit well with content negotiation. Most users prefer to handle those conversion in Resource subclasses. |
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 |
setMethod(Method method)
Sets the method called. |
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. |
| Methods inherited from class org.restlet.data.Request |
|---|
getCurrent, getOriginalRef, getRanges, setClientInfo, setConditions, setCookies, setOriginalRef, setRanges |
| Methods inherited from class org.restlet.data.Message |
|---|
release, setAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrapperRequest(Request wrappedRequest)
wrappedRequest - The wrapped request.| Method Detail |
|---|
public Map<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 DomRepresentation getEntityAsDom()
Message
getEntityAsDom in class Messagepublic Form getEntityAsForm()
getEntityAsForm in class Message@Deprecated public Object getEntityAsObject()
getEntityAsObject in class MessageConverterServicepublic SaxRepresentation getEntityAsSax()
getEntityAsSax in class Messagepublic Reference getHostRef()
getHostRef in class Requestpublic Method getMethod()
getMethod in class Requestpublic Protocol getProtocol()
getProtocol in class Requestpublic Reference getReferrerRef()
getReferrerRef in class Requestpublic Reference getResourceRef()
getResourceRef in class RequestRequest.getOriginalRef()public Reference getRootRef()
getRootRef in class Requestprotected Request getWrappedRequest()
public boolean isConfidential()
isConfidential in class Requestpublic boolean isEntityAvailable()
isEntityAvailable in class Requestpublic void setChallengeResponse(ChallengeResponse response)
setChallengeResponse in class Requestresponse - The authentication response sent by a client to an origin
server.public void setConfidential(boolean confidential)
setConfidential in class Requestconfidential - True if the call came over a confidential channel.@Deprecated public void setEntity(Object object)
setEntity in class Messageobject - The higher-level object.ConverterServicepublic 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 setMethod(Method method)
setMethod in class Requestmethod - The method called.public void setReferrerRef(Reference referrerRef)
setReferrerRef in class RequestreferrerRef - The referrer reference.public void setReferrerRef(String referrerUri)
setReferrerRef in class RequestreferrerUri - The referrer URI.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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||