|
||||||||||
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 | |
---|---|
java.util.Map<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. |
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. |
java.lang.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 |
setEntity(java.lang.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(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 |
setMethod(Method method)
Sets the method called. |
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. |
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 java.util.Map<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 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()
getEntity
in class Message
public DomRepresentation getEntityAsDom()
Message
getEntityAsDom
in class Message
public Form getEntityAsForm()
getEntityAsForm
in class Message
@Deprecated public java.lang.Object getEntityAsObject()
getEntityAsObject
in class Message
ConverterService
public SaxRepresentation getEntityAsSax()
getEntityAsSax
in class Message
public Reference getHostRef()
getHostRef
in class Request
public Method getMethod()
getMethod
in class Request
public Protocol getProtocol()
getProtocol
in class Request
public Reference getReferrerRef()
getReferrerRef
in class Request
public Reference getResourceRef()
getResourceRef
in class Request
Request.getOriginalRef()
public Reference getRootRef()
getRootRef
in class Request
protected Request getWrappedRequest()
public boolean isConfidential()
isConfidential
in class Request
public boolean isEntityAvailable()
isEntityAvailable
in class Request
public void setChallengeResponse(ChallengeResponse response)
setChallengeResponse
in class Request
response
- The authentication response sent by a client to an origin
server.@Deprecated public void setEntity(java.lang.Object object)
setEntity
in class Message
object
- The higher-level object.ConverterService
public void setEntity(Representation entity)
setEntity
in class Message
entity
- The entity representation.public void setEntity(java.lang.String value, MediaType mediaType)
setEntity
in class Message
value
- The represented string.mediaType
- The representation's media type.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 setMethod(Method method)
setMethod
in class Request
method
- The method called.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.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |