|
||||||||||
| 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.Response
org.restlet.util.WrapperResponse
public class WrapperResponse
Request wrapper. Useful for application developer who need to enrich the request with application related properties and behavior.
| Constructor Summary | |
|---|---|
WrapperResponse(Response wrappedResponse)
Constructor. |
|
| Method Summary | |
|---|---|
Set<Method> |
getAllowedMethods()
Returns the set of methods allowed on the requested resource. |
Map<String,Object> |
getAttributes()
Returns a modifiable attributes map that can be used by developers to save information relative to the message. |
ChallengeRequest |
getChallengeRequest()
Returns the authentication request sent by an origin server to a client. |
Series<CookieSetting> |
getCookieSettings()
Returns the cookie settings provided by the server. |
Set<Dimension> |
getDimensions()
Returns the set of selecting dimensions on which the response entity may vary. |
Representation |
getEntity()
Returns the entity representation. |
DomRepresentation |
getEntityAsDom()
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. |
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()
Returns the entity as a higher-level object. |
SaxRepresentation |
getEntityAsSax()
Returns the entity as a SAX representation. Note that this kind of representation can only be parsed once. |
Reference |
getRedirectRef()
Returns the reference that the client should follow for redirections or resource creations. |
Request |
getRequest()
Returns the associated request |
ServerInfo |
getServerInfo()
Returns the server-specific information. |
Status |
getStatus()
Returns the status. |
protected Response |
getWrappedResponse()
Returns the wrapped response. |
boolean |
isEntityAvailable()
Indicates if a content is available and can be sent. |
void |
redirectPermanent(Reference targetRef)
Permanently redirects the client to a target URI. |
void |
redirectPermanent(String targetUri)
Permanently redirects the client to a target URI. |
void |
redirectSeeOther(Reference targetRef)
Redirects the client to a different URI that SHOULD be retrieved using a GET method on that resource. |
void |
redirectSeeOther(String targetUri)
Redirects the client to a different URI that SHOULD be retrieved using a GET method on that resource. |
void |
redirectTemporary(Reference targetRef)
Temporarily redirects the client to a target URI. |
void |
redirectTemporary(String targetUri)
Temporarily redirects the client to a target URI. |
void |
setChallengeRequest(ChallengeRequest request)
Sets the authentication request sent by an origin server to a client. |
void |
setEntity(Object object)
Sets the entity from a higher-level object. |
void |
setEntity(Representation entity)
Sets the entity representation. |
void |
setEntity(String value,
MediaType mediaType)
Sets a textual entity. |
void |
setRedirectRef(Reference redirectRef)
Sets the reference that the client should follow for redirections or resource creations. |
void |
setRedirectRef(String redirectUri)
Sets the reference that the client should follow for redirections or resource creations. |
void |
setRequest(Request request)
Sets the associated request. |
void |
setRequest(WrapperRequest request)
Sets the associated request. |
void |
setStatus(Status status)
Sets the status. |
void |
setStatus(Status status,
String message)
Sets the status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrapperResponse(Response wrappedResponse)
wrappedResponse - The wrapped response.| Method Detail |
|---|
public ChallengeRequest getChallengeRequest()
getChallengeRequest in class Responsepublic Series<CookieSetting> getCookieSettings()
getCookieSettings in class Responsepublic Reference getRedirectRef()
getRedirectRef in class Responsepublic Request getRequest()
getRequest in class Responsepublic ServerInfo getServerInfo()
getServerInfo in class Responsepublic Status getStatus()
getStatus in class Responseprotected Response getWrappedResponse()
public void setChallengeRequest(ChallengeRequest request)
setChallengeRequest in class Responserequest - The authentication request sent by an origin server to a
client.public void setRedirectRef(Reference redirectRef)
setRedirectRef in class ResponseredirectRef - The redirection reference.public void setRedirectRef(String redirectUri)
setRedirectRef in class ResponseredirectUri - The redirection URI.public void setRequest(WrapperRequest request)
request - The associated requestpublic void setStatus(Status status)
setStatus in class Responsestatus - The status to set.
public void setStatus(Status status,
String message)
setStatus in class Responsestatus - The status to set.message - The status message.public Set<Method> getAllowedMethods()
getAllowedMethods in class Responsepublic Set<Dimension> getDimensions()
getDimensions in class Responsepublic void redirectPermanent(Reference targetRef)
redirectPermanent in class ResponsetargetRef - The target URI reference.public void redirectPermanent(String targetUri)
redirectPermanent in class ResponsetargetUri - The target URI.public void redirectSeeOther(Reference targetRef)
redirectSeeOther in class ResponsetargetRef - The target reference.public void redirectSeeOther(String targetUri)
redirectSeeOther in class ResponsetargetUri - The target URI.public void redirectTemporary(Reference targetRef)
redirectTemporary in class ResponsetargetRef - The target reference.public void redirectTemporary(String targetUri)
redirectTemporary in class ResponsetargetUri - The target URI.public void setRequest(Request request)
setRequest in class Responserequest - The associated requestpublic 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 Representation getEntity()
getEntity in class Messagepublic DomRepresentation getEntityAsDom()
getEntityAsDom in class Messagepublic Form getEntityAsForm()
getEntityAsForm in class Messagepublic Object getEntityAsObject()
getEntityAsObject in class MessageConverterServicepublic SaxRepresentation getEntityAsSax()
getEntityAsSax in class Messagepublic boolean isEntityAvailable()
isEntityAvailable in class Messagepublic 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||