com.netflix.niws.client.http
Class HttpClientResponse

java.lang.Object
  extended by com.netflix.niws.client.http.HttpClientResponse
All Implemented Interfaces:
com.netflix.client.IResponse

public class HttpClientResponse
extends java.lang.Object
implements com.netflix.client.IResponse

A NIWS Client Response (this version just wraps Jersey Client response)


Constructor Summary
HttpClientResponse(com.sun.jersey.api.client.ClientResponse cr)
           
 
Method Summary
<T> T
getEntity(java.lang.Class<T> c)
           
 javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
           
 com.sun.jersey.api.client.ClientResponse getJerseyClientResponse()
           
 java.lang.Object getPayload()
           
 java.io.InputStream getRawEntity()
          Returns the raw entity if available from the response
 java.net.URI getRequestedURI()
           
 int getStatus()
           
 boolean hasEntity()
           
 boolean hasPayload()
           
 boolean isSuccess()
           
 void releaseResources()
           
 void setRequestedURI(java.net.URI requestedURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientResponse

public HttpClientResponse(com.sun.jersey.api.client.ClientResponse cr)
Method Detail

getRawEntity

public java.io.InputStream getRawEntity()
                                 throws com.netflix.client.ClientException
Returns the raw entity if available from the response

Returns:
Throws:
java.lang.IllegalArgumentException
com.netflix.client.ClientException

getEntity

public <T> T getEntity(java.lang.Class<T> c)
            throws java.lang.IllegalArgumentException,
                   com.netflix.client.ClientException
Throws:
java.lang.IllegalArgumentException
com.netflix.client.ClientException

getHeaders

public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
Specified by:
getHeaders in interface com.netflix.client.IResponse

getStatus

public int getStatus()

isSuccess

public boolean isSuccess()
Specified by:
isSuccess in interface com.netflix.client.IResponse

hasEntity

public boolean hasEntity()

getRequestedURI

public java.net.URI getRequestedURI()
Specified by:
getRequestedURI in interface com.netflix.client.IResponse

setRequestedURI

public void setRequestedURI(java.net.URI requestedURI)

getPayload

public java.lang.Object getPayload()
                            throws com.netflix.client.ClientException
Specified by:
getPayload in interface com.netflix.client.IResponse
Throws:
com.netflix.client.ClientException

hasPayload

public boolean hasPayload()
Specified by:
hasPayload in interface com.netflix.client.IResponse

getJerseyClientResponse

public com.sun.jersey.api.client.ClientResponse getJerseyClientResponse()

releaseResources

public void releaseResources()