|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.api.client.ClientResponse
public class ClientResponse
A client (in-bound) HTTP response.
| Field Summary | |
|---|---|
protected static javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<java.util.Date> |
dateDelegate
|
protected static javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.EntityTag> |
entityTagDelegate
|
| Constructor Summary | |
|---|---|
ClientResponse(int status,
InBoundHeaders headers,
java.io.InputStream entity,
MessageBodyWorkers workers)
|
|
| Method Summary | ||
|---|---|---|
java.util.List<javax.ws.rs.core.NewCookie> |
getCookies()
Get the list of cookies. |
|
|
getEntity(java.lang.Class<T> c)
Get the entity of the response. |
|
|
getEntity(GenericType<T> gt)
Get the entity of the response. |
|
java.io.InputStream |
getEntityInputStream()
Get the input stream of the response. |
|
javax.ws.rs.core.EntityTag |
getEntityTag()
Get the entity tag. |
|
java.lang.String |
getLanguage()
Get the language. |
|
java.util.Date |
getLastModified()
Get the last modified date. |
|
java.net.URI |
getLocation()
Get the location. |
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getMetadata()
Get the HTTP headers of the response. |
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Get the map of response properties. |
|
java.util.Date |
getResponseDate()
Get response date (server side). |
|
javax.ws.rs.core.Response.Status |
getResponseStatus()
Get the status code. |
|
int |
getStatus()
Get the status code. |
|
javax.ws.rs.core.MediaType |
getType()
Get the media type of the response. |
|
boolean |
hasEntity()
|
|
void |
setEntityInputStream(java.io.InputStream entity)
Set the input stream of the response. |
|
void |
setResponseStatus(javax.ws.rs.core.Response.Status status)
Set the status code. |
|
void |
setStatus(int status)
Set the status code. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.EntityTag> entityTagDelegate
protected static final javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<java.util.Date> dateDelegate
| Constructor Detail |
|---|
public ClientResponse(int status,
InBoundHeaders headers,
java.io.InputStream entity,
MessageBodyWorkers workers)
| Method Detail |
|---|
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
A response property is an application-defined property that may be added by the user, a filter, or the handler that is managing the connection.
public int getStatus()
public void setStatus(int status)
status - the status code.public javax.ws.rs.core.Response.Status getResponseStatus()
setStatus(int) and there is no
mapping between the the integer value and the Response.Status
enumeration value.public void setResponseStatus(javax.ws.rs.core.Response.Status status)
status - the status code.public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getMetadata()
public boolean hasEntity()
public java.io.InputStream getEntityInputStream()
public void setEntityInputStream(java.io.InputStream entity)
entity - the input stream of the response.
public <T> T getEntity(java.lang.Class<T> c)
throws java.lang.IllegalArgumentException,
UniformInterfaceException
If the entity is not an instance of Closeable then the entity input stream is closed.
T - the type of the response.c - the type of the entity.
c.
java.lang.IllegalArgumentException
UniformInterfaceException - if the response status is 204 (No Contnet).
public <T> T getEntity(GenericType<T> gt)
throws java.lang.IllegalArgumentException,
UniformInterfaceException
If the entity is not an instance of Closeable then the entity input stream is closed.
T - the type of the response.gt - the generic type of the entity.
java.lang.IllegalArgumentException
UniformInterfaceException - if the response status is 204 (No Content).public javax.ws.rs.core.MediaType getType()
public java.net.URI getLocation()
public javax.ws.rs.core.EntityTag getEntityTag()
public java.util.Date getLastModified()
public java.util.Date getResponseDate()
public java.lang.String getLanguage()
public java.util.List<javax.ws.rs.core.NewCookie> getCookies()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||