public class ClientResponse extends InboundMessageContext implements ClientResponseContext
| Constructor and Description |
|---|
ClientResponse(ClientRequest requestContext,
Response response)
Create new Jersey client response context initialized from a JAX-RS
response. |
ClientResponse(Response.StatusType status,
ClientRequest requestContext)
Create a new Jersey client response context.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,NewCookie> |
getCookies()
Get any new cookies set on the response message.
|
Set<Link> |
getLinks()
Get the links attached to the message as header.
|
ClientRequest |
getRequestContext()
Get the associated client request context paired with this response context.
|
int |
getStatus()
Get the status code associated with the response.
|
Response.StatusType |
getStatusInfo()
Get the complete status information associated with the response.
|
void |
setStatus(int code)
Set a new response status code.
|
void |
setStatusInfo(Response.StatusType status)
Set the complete status information (status code and reason phrase) associated
with the response.
|
String |
toString() |
bufferEntity, close, getAllowedMethods, getDate, getEntityStream, getEntityTag, getHeaders, getHeaderString, getIfMatch, getIfNoneMatch, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLocation, getMediaType, getQualifiedAcceptableLanguages, getQualifiedAcceptableMediaTypes, getQualifiedAcceptCharset, getQualifiedAcceptEncoding, getRequestCookies, getResponseCookies, getWorkers, hasEntity, hasLink, header, headers, headers, headers, headers, readEntity, readEntity, readEntity, readEntity, remove, setEntityStream, setReaderInterceptors, setWorkersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAllowedMethods, getDate, getEntityStream, getEntityTag, getHeaders, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLocation, getMediaType, hasEntity, hasLink, setEntityStreampublic ClientResponse(ClientRequest requestContext, Response response)
response.requestContext - associated request context.response - JAX-RS response to be used to initialize the response context.public ClientResponse(Response.StatusType status, ClientRequest requestContext)
status - response status.requestContext - associated client request context.public int getStatus()
ClientResponseContextgetStatus in interface ClientResponseContextpublic void setStatus(int code)
ClientResponseContextsetStatus in interface ClientResponseContextcode - new status code.public void setStatusInfo(Response.StatusType status)
ClientResponseContextsetStatusInfo in interface ClientResponseContextstatus - the response status information.public Response.StatusType getStatusInfo()
ClientResponseContextgetStatusInfo in interface ClientResponseContextnull if the status was
not set.public ClientRequest getRequestContext()
public Map<String,NewCookie> getCookies()
ClientResponseContextgetCookies in interface ClientResponseContextnew cookie.public Set<Link> getLinks()
InboundMessageContextgetLinks in interface ClientResponseContextgetLinks in class InboundMessageContextSet if no links are present. Never
returns null.Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.