Package org.restlet.engine.adapter
Class HttpResponse
- java.lang.Object
-
- org.restlet.Message
-
- org.restlet.Response
-
- org.restlet.engine.adapter.HttpResponse
-
public class HttpResponse extends Response
Response wrapper for server HTTP calls.
-
-
Field Summary
Fields Modifier and Type Field Description private ServerCallhttpCallThe low-level HTTP call.private booleanserverAddedIndicates if the server data was parsed and added.
-
Constructor Summary
Constructors Constructor Description HttpResponse(ServerCall httpCall, Request request)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddHeader(Response response, java.lang.String headerName, java.lang.String headerValue)Adds a new header to the given request.ServerCallgetHttpCall()Returns the low-level HTTP call.ServerInfogetServerInfo()Returns the server-specific information.-
Methods inherited from class org.restlet.Response
abort, commit, flushBuffers, getAccessControlAllowCredentials, getAccessControlAllowHeaders, getAccessControlAllowMethods, getAccessControlAllowOrigin, getAccessControlExposeHeaders, getAccessControlMaxAge, getAge, getAllowedMethods, getAuthenticationInfo, getChallengeRequests, getCookieSettings, getCurrent, getDimensions, getLocationRef, getProxyChallengeRequests, getRequest, getRetryAfter, getStatus, isAutoCommitting, isCommitted, isConfidential, isFinal, isProvisional, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAccessControlAllowCredentials, setAccessControlAllowHeaders, setAccessControlAllowMethods, setAccessControlAllowOrigin, setAccessControlExposeHeaders, setAccessControlMaxAge, setAge, setAllowedMethods, setAuthenticationInfo, setAutoCommitting, setChallengeRequests, setCommitted, setCookieSettings, setCurrent, setDimensions, setLocationRef, setLocationRef, setProxyChallengeRequests, setRequest, setRetryAfter, setServerInfo, setStatus, setStatus, setStatus, setStatus, toString
-
Methods inherited from class org.restlet.Message
bufferEntity, getAttributes, getCacheDirectives, getDate, getEntity, getEntityAsText, getHeaders, getOnError, getOnSent, getRecipientsInfo, getWarnings, isEntityAvailable, release, setAttributes, setCacheDirectives, setDate, setEntity, setEntity, setOnError, setOnSent, setRecipientsInfo, setWarnings
-
-
-
-
Field Detail
-
httpCall
private volatile ServerCall httpCall
The low-level HTTP call.
-
serverAdded
private volatile boolean serverAdded
Indicates if the server data was parsed and added.
-
-
Constructor Detail
-
HttpResponse
public HttpResponse(ServerCall httpCall, Request request)
Constructor.- Parameters:
httpCall- The low-level HTTP server call.request- The associated high-level request.
-
-
Method Detail
-
addHeader
public static void addHeader(Response response, java.lang.String headerName, java.lang.String headerValue)
Adds a new header to the given request.- Parameters:
response- The response to update.headerName- The header name to add.headerValue- The header value to add.
-
getHttpCall
public ServerCall getHttpCall()
Returns the low-level HTTP call.- Returns:
- The low-level HTTP call.
-
getServerInfo
public ServerInfo getServerInfo()
Returns the server-specific information.- Overrides:
getServerInfoin classResponse- Returns:
- The server-specific information.
-
-