class InboundJaxrsResponse
extends javax.ws.rs.core.Response
Response
message.
This response delegates method calls to the underlying
client response context
and
ensures that all request-scoped method invocations are run in the proper request scope.
Modifier and Type | Field and Description |
---|---|
private ClientResponse |
context |
private RequestScope |
scope |
private RequestScope.Instance |
scopeInstance |
Constructor and Description |
---|
InboundJaxrsResponse(ClientResponse context,
RequestScope scope)
Create new scoped client response.
|
Modifier and Type | Method and Description |
---|---|
boolean |
bufferEntity() |
void |
close() |
java.util.Set<java.lang.String> |
getAllowedMethods() |
java.util.Map<java.lang.String,javax.ws.rs.core.NewCookie> |
getCookies() |
java.util.Date |
getDate() |
java.lang.Object |
getEntity() |
javax.ws.rs.core.EntityTag |
getEntityTag() |
java.lang.String |
getHeaderString(java.lang.String name) |
java.util.Locale |
getLanguage() |
java.util.Date |
getLastModified() |
int |
getLength() |
javax.ws.rs.core.Link |
getLink(java.lang.String relation) |
javax.ws.rs.core.Link.Builder |
getLinkBuilder(java.lang.String relation) |
java.util.Set<javax.ws.rs.core.Link> |
getLinks() |
java.net.URI |
getLocation() |
javax.ws.rs.core.MediaType |
getMediaType() |
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> |
getMetadata() |
int |
getStatus() |
javax.ws.rs.core.Response.StatusType |
getStatusInfo() |
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getStringHeaders() |
boolean |
hasEntity() |
boolean |
hasLink(java.lang.String relation) |
<T> T |
readEntity(java.lang.Class<T> entityType) |
<T> T |
readEntity(java.lang.Class<T> entityType,
java.lang.annotation.Annotation[] annotations) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> entityType) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> entityType,
java.lang.annotation.Annotation[] annotations) |
private <T> T |
runInScopeIfPossible(Producer<T> producer) |
java.lang.String |
toString() |
private final ClientResponse context
private final RequestScope scope
private final RequestScope.Instance scopeInstance
public InboundJaxrsResponse(ClientResponse context, RequestScope scope)
context
- jersey client response context.scope
- request scope instance.public int getStatus()
getStatus
in class javax.ws.rs.core.Response
public javax.ws.rs.core.Response.StatusType getStatusInfo()
getStatusInfo
in class javax.ws.rs.core.Response
public java.lang.Object getEntity() throws java.lang.IllegalStateException
getEntity
in class javax.ws.rs.core.Response
java.lang.IllegalStateException
public <T> T readEntity(java.lang.Class<T> entityType) throws javax.ws.rs.ProcessingException, java.lang.IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
java.lang.IllegalStateException
public <T> T readEntity(javax.ws.rs.core.GenericType<T> entityType) throws javax.ws.rs.ProcessingException, java.lang.IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
java.lang.IllegalStateException
public <T> T readEntity(java.lang.Class<T> entityType, java.lang.annotation.Annotation[] annotations) throws javax.ws.rs.ProcessingException, java.lang.IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
java.lang.IllegalStateException
public <T> T readEntity(javax.ws.rs.core.GenericType<T> entityType, java.lang.annotation.Annotation[] annotations) throws javax.ws.rs.ProcessingException, java.lang.IllegalStateException
readEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
java.lang.IllegalStateException
public boolean hasEntity()
hasEntity
in class javax.ws.rs.core.Response
public boolean bufferEntity() throws javax.ws.rs.ProcessingException
bufferEntity
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public void close() throws javax.ws.rs.ProcessingException
close
in class javax.ws.rs.core.Response
javax.ws.rs.ProcessingException
public java.lang.String getHeaderString(java.lang.String name)
getHeaderString
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getStringHeaders()
getStringHeaders
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MediaType getMediaType()
getMediaType
in class javax.ws.rs.core.Response
public java.util.Locale getLanguage()
getLanguage
in class javax.ws.rs.core.Response
public int getLength()
getLength
in class javax.ws.rs.core.Response
public java.util.Map<java.lang.String,javax.ws.rs.core.NewCookie> getCookies()
getCookies
in class javax.ws.rs.core.Response
public javax.ws.rs.core.EntityTag getEntityTag()
getEntityTag
in class javax.ws.rs.core.Response
public java.util.Date getDate()
getDate
in class javax.ws.rs.core.Response
public java.util.Date getLastModified()
getLastModified
in class javax.ws.rs.core.Response
public java.util.Set<java.lang.String> getAllowedMethods()
getAllowedMethods
in class javax.ws.rs.core.Response
public java.net.URI getLocation()
getLocation
in class javax.ws.rs.core.Response
public java.util.Set<javax.ws.rs.core.Link> getLinks()
getLinks
in class javax.ws.rs.core.Response
public boolean hasLink(java.lang.String relation)
hasLink
in class javax.ws.rs.core.Response
public javax.ws.rs.core.Link getLink(java.lang.String relation)
getLink
in class javax.ws.rs.core.Response
public javax.ws.rs.core.Link.Builder getLinkBuilder(java.lang.String relation)
getLinkBuilder
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
getMetadata
in class javax.ws.rs.core.Response
public java.lang.String toString()
toString
in class java.lang.Object
private <T> T runInScopeIfPossible(Producer<T> producer)