com.sun.jersey.client.impl
Class ClientRequestImpl

java.lang.Object
  extended by com.sun.jersey.api.client.ClientRequest
      extended by com.sun.jersey.client.impl.ClientRequestImpl
All Implemented Interfaces:
ClientRequestAdapter

public final class ClientRequestImpl
extends ClientRequest
implements ClientRequestAdapter


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.jersey.api.client.ClientRequest
ClientRequest.Builder
 
Constructor Summary
ClientRequestImpl(java.net.URI uri, java.lang.String method)
           
ClientRequestImpl(java.net.URI uri, java.lang.String method, java.lang.Object entity)
           
ClientRequestImpl(java.net.URI uri, java.lang.String method, java.lang.Object entity, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> metadata)
           
 
Method Summary
 java.io.OutputStream adapt(ClientRequest request, java.io.OutputStream out)
          Adapt the output stream of the client request.
 ClientRequest clone()
          Clone the request.
 ClientRequestAdapter getAdapter()
          Get the client request adapter.
 java.lang.Object getEntity()
          Get the entity of the request.
 javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> getHeaders()
          Get the HTTP headers of the request.
 javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
          Get the HTTP headers of the request.
 java.lang.String getMethod()
          Get the HTTP method of the request.
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Get the mutable property bag.
 java.net.URI getURI()
          Get the URI of the request.
 void setAdapter(ClientRequestAdapter adapter)
          Set the client request adapter.
 void setEntity(java.lang.Object entity)
          Set the entity of the request.
 void setMethod(java.lang.String method)
          Set the HTTP method of the request.
 void setURI(java.net.URI uri)
          Set the URI of the request.
 
Methods inherited from class com.sun.jersey.api.client.ClientRequest
create, getHeaderValue, getPropertyAsFeature, getPropertyAsFeature
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientRequestImpl

public ClientRequestImpl(java.net.URI uri,
                         java.lang.String method)

ClientRequestImpl

public ClientRequestImpl(java.net.URI uri,
                         java.lang.String method,
                         java.lang.Object entity)

ClientRequestImpl

public ClientRequestImpl(java.net.URI uri,
                         java.lang.String method,
                         java.lang.Object entity,
                         javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> metadata)
Method Detail

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Description copied from class: ClientRequest
Get the mutable property bag.

Specified by:
getProperties in class ClientRequest
Returns:
the property bag.

getURI

public java.net.URI getURI()
Description copied from class: ClientRequest
Get the URI of the request. The URI shall contain sufficient components to correctly dispatch a request

Specified by:
getURI in class ClientRequest
Returns:
the URI of the request.

setURI

public void setURI(java.net.URI uri)
Description copied from class: ClientRequest
Set the URI of the request. The URI shall contain sufficient components to correctly dispatch a request

Specified by:
setURI in class ClientRequest
Parameters:
uri - the URI of the request.

getMethod

public java.lang.String getMethod()
Description copied from class: ClientRequest
Get the HTTP method of the request.

Specified by:
getMethod in class ClientRequest
Returns:
the HTTP method.

setMethod

public void setMethod(java.lang.String method)
Description copied from class: ClientRequest
Set the HTTP method of the request.

Specified by:
setMethod in class ClientRequest
Parameters:
method - the HTTP method.

getEntity

public java.lang.Object getEntity()
Description copied from class: ClientRequest
Get the entity of the request.

Specified by:
getEntity in class ClientRequest
Returns:
the entity of the request.

setEntity

public void setEntity(java.lang.Object entity)
Description copied from class: ClientRequest
Set the entity of the request.

Any Java type instance for a request entity, that is supported by the client configuration of the client, can be passed. If generic information is required then an instance of GenericEntity may be used.

Specified by:
setEntity in class ClientRequest
Parameters:
entity - the entity of the request.

getMetadata

public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
Description copied from class: ClientRequest
Get the HTTP headers of the request.

Specified by:
getMetadata in class ClientRequest
Returns:
the HTTP headers of the request.

getHeaders

public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> getHeaders()
Description copied from class: ClientRequest
Get the HTTP headers of the request.

Specified by:
getHeaders in class ClientRequest
Returns:
the HTTP headers of the request.

getAdapter

public ClientRequestAdapter getAdapter()
Description copied from class: ClientRequest
Get the client request adapter.

Specified by:
getAdapter in class ClientRequest
Returns:
the client request adapter.

setAdapter

public void setAdapter(ClientRequestAdapter adapter)
Description copied from class: ClientRequest
Set the client request adapter.

If an existing adapter is set then usually this adapter wrapped in the new adapter to be set such that the current adaption behaviour is retained and augmented with the new adpation behaviour.

Specified by:
setAdapter in class ClientRequest
Parameters:
adapter - the client request adapter.

clone

public ClientRequest clone()
Description copied from class: ClientRequest
Clone the request.

Specified by:
clone in class ClientRequest
Returns:
the cloned request.

adapt

public java.io.OutputStream adapt(ClientRequest request,
                                  java.io.OutputStream out)
                           throws java.io.IOException
Description copied from interface: ClientRequestAdapter
Adapt the output stream of the client request.

Specified by:
adapt in interface ClientRequestAdapter
Parameters:
request - the client request
out - the output stream to write the request entity.
Returns:
the adapted output stream to write the request entity.
Throws:
java.io.IOException


Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.