|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.api.client.ClientRequest
public abstract class ClientRequest
A client (out-bound) HTTP request.
Instances may be created by using the static method create()
and
methods on ClientRequest.Builder
.
Nested Class Summary | |
---|---|
static class |
ClientRequest.Builder
The builder for building a ClientRequest instance. |
Constructor Summary | |
---|---|
ClientRequest()
|
Method Summary | |
---|---|
abstract ClientRequest |
clone()
Clone the request. |
static ClientRequest.Builder |
create()
Create a builder for building a new ClientRequest instance. |
abstract ClientRequestAdapter |
getAdapter()
Get the client request adapter. |
abstract java.lang.Object |
getEntity()
Get the entity of the request. |
static java.lang.String |
getHeaderValue(java.lang.Object headerValue)
Convert a header value, represented as a general object, to the string value. |
abstract javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> |
getMetadata()
Get the HTTP headers of the request. |
abstract java.lang.String |
getMethod()
Get the HTTP method of the request. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Get the mutable property bag. |
abstract java.net.URI |
getURI()
Get the URI of the request. |
abstract void |
setAdapter(ClientRequestAdapter adapter)
Set the client request adapter. |
abstract void |
setEntity(java.lang.Object entity)
Set the entity of the request. |
abstract void |
setMethod(java.lang.String method)
Set the HTTP method of the request. |
abstract void |
setURI(java.net.URI uri)
Set the URI of the request. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientRequest()
Method Detail |
---|
public abstract java.util.Map<java.lang.String,java.lang.Object> getProperties()
public abstract java.net.URI getURI()
public abstract void setURI(java.net.URI uri)
uri
- the URI of the request.public abstract java.lang.String getMethod()
public abstract void setMethod(java.lang.String method)
method
- the HTTP method.public abstract java.lang.Object getEntity()
public abstract void setEntity(java.lang.Object entity)
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.
entity
- the entity of the request.public abstract javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
public abstract ClientRequestAdapter getAdapter()
public abstract void setAdapter(ClientRequestAdapter 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.
adapter
- the client request adapter.public abstract ClientRequest clone()
clone
in class java.lang.Object
public static final ClientRequest.Builder create()
ClientRequest
instance.
public static java.lang.String getHeaderValue(java.lang.Object headerValue)
This method defers to RuntimeDelegate.createHeaderDelegate(java.lang.Class
to
obtain a RuntimeDelegate.HeaderDelegate
to convert the value to a string.
Containers may use this method to convert the header values obtained
from the getMetadata()
.
headerValue
- the header value as an object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |