|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Message
org.restlet.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 | |
|---|---|
void |
abort()
|
void |
commit()
|
int |
getAge()
|
Set<Method> |
getAllowedMethods()
Returns the set of methods allowed on the requested resource. |
ConcurrentMap<String,Object> |
getAttributes()
Returns a modifiable attributes map that can be used by developers to save information relative to the message. |
AuthenticationInfo |
getAuthenticationInfo()
|
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. |
Set<Dimension> |
getDimensions()
Returns the set of selecting dimensions on which the response entity may vary. |
Representation |
getEntity()
Returns the entity representation. |
Reference |
getLocationRef()
Returns the reference that the client should follow for redirections or resource creations. |
List<ChallengeRequest> |
getProxyChallengeRequests()
Returns the list of authentication requests sent by a proxy to a client. |
Request |
getRequest()
Returns the associated request |
Date |
getRetryAfter()
|
ServerInfo |
getServerInfo()
Returns the server-specific information. |
Status |
getStatus()
Returns the status. |
protected Response |
getWrappedResponse()
Returns the wrapped response. |
boolean |
isAutoCommitting()
|
boolean |
isCommitted()
|
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(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 |
setAge(int age)
|
void |
setAllowedMethods(Set<Method> allowedMethods)
|
void |
setAuthenticationInfo(AuthenticationInfo authenticationInfo)
|
void |
setAutoCommitting(boolean autoCommitting)
|
void |
setChallengeRequests(List<ChallengeRequest> requests)
Sets the list of authentication requests sent by an origin server to a client. |
void |
setCommitted(boolean committed)
|
void |
setCookieSettings(Series<CookieSetting> cookieSettings)
|
void |
setDimensions(Set<Dimension> dimensions)
|
void |
setEntity(Representation entity)
Sets the entity representation. |
void |
setEntity(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(String locationUri)
Sets the reference that the client should follow for redirections or resource creations. |
void |
setProxyChallengeRequests(List<ChallengeRequest> requests)
Sets the list of authentication requests sent by a proxy to a client. |
void |
setRequest(Request request)
Sets the associated request. |
void |
setRequest(WrapperRequest request)
Sets the associated request. |
void |
setRetryAfter(Date retryAfter)
|
void |
setServerInfo(ServerInfo serverInfo)
|
void |
setStatus(Status status)
Sets the status. |
void |
setStatus(Status status,
String message)
Sets the status. |
void |
setStatus(Status status,
Throwable throwable)
|
void |
setStatus(Status status,
Throwable throwable,
String message)
|
String |
toString()
|
| Methods inherited from class org.restlet.Response |
|---|
getCurrent, isFinal, isProvisional, setCurrent |
| 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 WrapperResponse(Response wrappedResponse)
wrappedResponse - The wrapped response.| Method Detail |
|---|
public void abort()
abort in class Responsepublic void commit()
commit in class Responsepublic int getAge()
getAge in class Responsepublic Set<Method> getAllowedMethods()
getAllowedMethods in class Responsepublic 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 AuthenticationInfo getAuthenticationInfo()
getAuthenticationInfo in class Responsepublic List<ChallengeRequest> getChallengeRequests()
getChallengeRequests in class Responsepublic Series<CookieSetting> getCookieSettings()
getCookieSettings in class Responsepublic Set<Dimension> getDimensions()
getDimensions in class Responsepublic Representation getEntity()
getEntity in class Messagepublic Reference getLocationRef()
getLocationRef in class Responsepublic List<ChallengeRequest> getProxyChallengeRequests()
getProxyChallengeRequests in class Responsepublic Request getRequest()
getRequest in class Responsepublic Date getRetryAfter()
getRetryAfter in class Responsepublic ServerInfo getServerInfo()
getServerInfo in class Responsepublic Status getStatus()
getStatus in class Responseprotected Response getWrappedResponse()
public boolean isAutoCommitting()
isAutoCommitting in class Responsepublic boolean isCommitted()
isCommitted in class Responsepublic boolean isConfidential()
isConfidential in class Responsepublic boolean isEntityAvailable()
isEntityAvailable in class Messagepublic 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 setAge(int age)
setAge in class Responsepublic void setAllowedMethods(Set<Method> allowedMethods)
setAllowedMethods in class Responsepublic void setAuthenticationInfo(AuthenticationInfo authenticationInfo)
setAuthenticationInfo in class Responsepublic void setAutoCommitting(boolean autoCommitting)
setAutoCommitting in class Responsepublic void setChallengeRequests(List<ChallengeRequest> requests)
setChallengeRequests in class Responserequests - The list of authentication requests sent by an origin server
to a client.public void setCommitted(boolean committed)
setCommitted in class Responsepublic void setCookieSettings(Series<CookieSetting> cookieSettings)
setCookieSettings in class Responsepublic void setDimensions(Set<Dimension> dimensions)
setDimensions in class Responsepublic 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 setLocationRef(Reference locationRef)
setLocationRef in class ResponselocationRef - The reference to set.public void setLocationRef(String locationUri)
setLocationRef in class ResponselocationUri - The URI to set.public void setProxyChallengeRequests(List<ChallengeRequest> requests)
setProxyChallengeRequests in class Responserequests - The list of authentication requests sent by a proxy to a
client.public void setRequest(Request request)
setRequest in class Responserequest - The associated requestpublic void setRequest(WrapperRequest request)
request - The associated requestpublic void setRetryAfter(Date retryAfter)
setRetryAfter in class Responsepublic void setServerInfo(ServerInfo serverInfo)
setServerInfo in class Responsepublic 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 void setStatus(Status status,
Throwable throwable)
setStatus in class Response
public void setStatus(Status status,
Throwable throwable,
String message)
setStatus in class Responsepublic String toString()
toString in class Response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||