public final class ClientRequestImpl extends ClientRequest implements ClientRequestAdapter
ClientRequest.Builder| Constructor and Description |
|---|
ClientRequestImpl(URI uri,
String method) |
ClientRequestImpl(URI uri,
String method,
Object entity) |
ClientRequestImpl(URI uri,
String method,
Object entity,
javax.ws.rs.core.MultivaluedMap<String,Object> metadata) |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
adapt(ClientRequest request,
OutputStream out)
Adapt the output stream of the client request.
|
ClientRequest |
clone()
Clone the request.
|
ClientRequestAdapter |
getAdapter()
Get the client request adapter.
|
Object |
getEntity()
Get the entity of the request.
|
javax.ws.rs.core.MultivaluedMap<String,Object> |
getHeaders()
Get the HTTP headers of the request.
|
javax.ws.rs.core.MultivaluedMap<String,Object> |
getMetadata()
Get the HTTP headers of the request.
|
String |
getMethod()
Get the HTTP method of the request.
|
Map<String,Object> |
getProperties()
Get the mutable property bag.
|
URI |
getURI()
Get the URI of the request.
|
void |
setAdapter(ClientRequestAdapter adapter)
Set the client request adapter.
|
void |
setEntity(Object entity)
Set the entity of the request.
|
void |
setMethod(String method)
Set the HTTP method of the request.
|
void |
setProperties(Map<String,Object> properties)
Sets properties (replaces everything previously set).
|
void |
setURI(URI uri)
Set the URI of the request.
|
create, getHeaderValue, getPropertyAsFeature, getPropertyAsFeaturepublic Map<String,Object> getProperties()
ClientRequestgetProperties in class ClientRequestpublic void setProperties(Map<String,Object> properties)
ClientRequestsetProperties in class ClientRequestpublic URI getURI()
ClientRequestgetURI in class ClientRequestpublic void setURI(URI uri)
ClientRequestsetURI in class ClientRequesturi - the URI of the request.public String getMethod()
ClientRequestgetMethod in class ClientRequestpublic void setMethod(String method)
ClientRequestsetMethod in class ClientRequestmethod - the HTTP method.public Object getEntity()
ClientRequestgetEntity in class ClientRequestpublic void setEntity(Object entity)
ClientRequest
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.
setEntity in class ClientRequestentity - the entity of the request.public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
ClientRequestgetMetadata in class ClientRequestpublic javax.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
ClientRequestgetHeaders in class ClientRequestpublic ClientRequestAdapter getAdapter()
ClientRequestgetAdapter in class ClientRequestpublic void setAdapter(ClientRequestAdapter adapter)
ClientRequestIf an existing adapter is set then usually this adapter wrapped in the new adapter to be set such that the current adaption behavior is retained and augmented with the new adaptation behavior.
setAdapter in class ClientRequestadapter - the client request adapter.public ClientRequest clone()
ClientRequestclone in class ClientRequestpublic OutputStream adapt(ClientRequest request, OutputStream out) throws IOException
ClientRequestAdapteradapt in interface ClientRequestAdapterrequest - the client requestout - the output stream to write the request entity.IOExceptionCopyright © 2016 Oracle Corporation. All rights reserved.