|
||||||||||
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 | |
---|---|
java.util.Set<Method> |
getAllowedMethods()
Returns the set of methods allowed on the requested resource. |
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. |
ChallengeRequest |
getChallengeRequest()
Deprecated. Use the getChallengeRequests() instead. |
java.util.List<ChallengeRequest> |
getChallengeRequests()
Returns the list of authentication requests sent by an origin server to a client. |
Series<CookieSetting> |
getCookieSettings()
Returns the cookie settings provided by the server. |
java.util.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. |
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 |
getLocationRef()
Returns the reference that the client should follow for redirections or resource creations. |
Reference |
getRedirectRef()
Deprecated. Use the getLocationRef() method instead. |
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 |
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 |
redirectPermanent(Reference targetRef)
Permanently redirects the client to a target URI. |
void |
redirectPermanent(java.lang.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(java.lang.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(java.lang.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 |
setChallengeRequests(java.util.List<ChallengeRequest> requests)
Sets the list of authentication requests sent by an origin server to a client. |
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 |
setLocationRef(Reference locationRef)
Sets the reference that the client should follow for redirections or resource creations. |
void |
setLocationRef(java.lang.String locationUri)
Sets the reference that the client should follow for redirections or resource creations. |
void |
setRedirectRef(Reference redirectRef)
Deprecated. Use the setLocationRef() method instead. |
void |
setRedirectRef(java.lang.String redirectUri)
Deprecated. Use the setLocationRef() method instead. |
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,
java.lang.String message)
Sets the status. |
Methods inherited from class org.restlet.data.Response |
---|
getCurrent, setAllowedMethods, setCookieSettings, setCurrent, setDimensions, setServerInfo, setStatus, setStatus |
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 WrapperResponse(Response wrappedResponse)
wrappedResponse
- The wrapped response.Method Detail |
---|
public java.util.Set<Method> getAllowedMethods()
getAllowedMethods
in class Response
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
@Deprecated public ChallengeRequest getChallengeRequest()
getChallengeRequests()
instead.
getChallengeRequest
in class Response
public java.util.List<ChallengeRequest> getChallengeRequests()
getChallengeRequests
in class Response
public Series<CookieSetting> getCookieSettings()
getCookieSettings
in class Response
public java.util.Set<Dimension> getDimensions()
getDimensions
in class Response
public Representation getEntity()
getEntity
in class Message
public DomRepresentation getEntityAsDom()
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 getLocationRef()
getLocationRef
in class Response
@Deprecated public Reference getRedirectRef()
getRedirectRef
in class Response
public Request getRequest()
getRequest
in class Response
public ServerInfo getServerInfo()
getServerInfo
in class Response
public Status getStatus()
getStatus
in class Response
protected Response getWrappedResponse()
public boolean isConfidential()
isConfidential
in class Response
public boolean isEntityAvailable()
isEntityAvailable
in class Message
public void redirectPermanent(Reference targetRef)
redirectPermanent
in class Response
targetRef
- The target URI reference.public void redirectPermanent(java.lang.String targetUri)
redirectPermanent
in class Response
targetUri
- The target URI.public void redirectSeeOther(Reference targetRef)
redirectSeeOther
in class Response
targetRef
- The target reference.public void redirectSeeOther(java.lang.String targetUri)
redirectSeeOther
in class Response
targetUri
- The target URI.public void redirectTemporary(Reference targetRef)
redirectTemporary
in class Response
targetRef
- The target reference.public void redirectTemporary(java.lang.String targetUri)
redirectTemporary
in class Response
targetUri
- The target URI.public void setChallengeRequest(ChallengeRequest request)
setChallengeRequest
in class Response
request
- The authentication request sent by an origin server to a
client.public void setChallengeRequests(java.util.List<ChallengeRequest> requests)
setChallengeRequests
in class Response
requests
- The list of authentication requests sent by an origin server
to a client.@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 setLocationRef(Reference locationRef)
setLocationRef
in class Response
locationRef
- The reference to set.public void setLocationRef(java.lang.String locationUri)
setLocationRef
in class Response
locationUri
- The URI to set.@Deprecated public void setRedirectRef(Reference redirectRef)
setRedirectRef
in class Response
redirectRef
- The redirection reference.@Deprecated public void setRedirectRef(java.lang.String redirectUri)
setRedirectRef
in class Response
redirectUri
- The redirection URI.public void setRequest(Request request)
setRequest
in class Response
request
- The associated requestpublic void setRequest(WrapperRequest request)
request
- The associated requestpublic void setStatus(Status status)
setStatus
in class Response
status
- The status to set.public void setStatus(Status status, java.lang.String message)
setStatus
in class Response
status
- The status to set.message
- The status message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |