com.sun.ws.rest.api.client
Class ClientResponse

java.lang.Object
  extended by com.sun.ws.rest.api.client.ClientResponse

public abstract class ClientResponse
extends java.lang.Object

A client (inbound) 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()
           
 
Method Summary
 java.util.List<javax.ws.rs.core.NewCookie> getCookies()
           
abstract
<T> T
getEntity(java.lang.Class<T> c)
          Get the entity 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.
abstract  javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getMetadata()
          Get the HTTP metadata
abstract  java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Get a list of response properties.
abstract  int getStatus()
          Get the status code.
 javax.ws.rs.core.MediaType getType()
          Get the media type of the response
abstract  boolean hasEntity()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityTagDelegate

protected static final javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<javax.ws.rs.core.EntityTag> entityTagDelegate

dateDelegate

protected static final javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<java.util.Date> dateDelegate
Constructor Detail

ClientResponse

public ClientResponse()
Method Detail

getStatus

public abstract int getStatus()
Get the status code.

Returns:
the status code.

getMetadata

public abstract javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getMetadata()
Get the HTTP metadata

Returns:
the HTTP metadata.

hasEntity

public abstract boolean hasEntity()
Returns:
true if there is an entity present in the response.

getEntity

public abstract <T> T getEntity(java.lang.Class<T> c)
                     throws java.lang.IllegalArgumentException
Get the entity of the response.

Parameters:
c - the type of the entity.
Returns:
an instance of the type c.
Throws:
java.lang.IllegalArgumentException

getProperties

public abstract java.util.Map<java.lang.String,java.lang.Object> getProperties()
Get a list of response properties.

Returns:
the list of response properties.

getType

public javax.ws.rs.core.MediaType getType()
Get the media type of the response

Returns:
the media type.

getLocation

public java.net.URI getLocation()
Get the location.

Returns:
the location.

getEntityTag

public javax.ws.rs.core.EntityTag getEntityTag()
Get the entity tag.

Returns:
the entity tag.

getLastModified

public java.util.Date getLastModified()
Get the last modified date.

Returns:
the last modified date.

getLanguage

public java.lang.String getLanguage()
Get the language.

Returns:
the language.

getCookies

public java.util.List<javax.ws.rs.core.NewCookie> getCookies()