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, getPropertyAsFeature
public Map<String,Object> getProperties()
ClientRequest
getProperties
in class ClientRequest
public void setProperties(Map<String,Object> properties)
ClientRequest
setProperties
in class ClientRequest
public URI getURI()
ClientRequest
getURI
in class ClientRequest
public void setURI(URI uri)
ClientRequest
setURI
in class ClientRequest
uri
- the URI of the request.public String getMethod()
ClientRequest
getMethod
in class ClientRequest
public void setMethod(String method)
ClientRequest
setMethod
in class ClientRequest
method
- the HTTP method.public Object getEntity()
ClientRequest
getEntity
in class ClientRequest
public 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 ClientRequest
entity
- the entity of the request.public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
ClientRequest
getMetadata
in class ClientRequest
public javax.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
ClientRequest
getHeaders
in class ClientRequest
public ClientRequestAdapter getAdapter()
ClientRequest
getAdapter
in class ClientRequest
public void setAdapter(ClientRequestAdapter adapter)
ClientRequest
If 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 ClientRequest
adapter
- the client request adapter.public ClientRequest clone()
ClientRequest
clone
in class ClientRequest
public OutputStream adapt(ClientRequest request, OutputStream out) throws IOException
ClientRequestAdapter
adapt
in interface ClientRequestAdapter
request
- the client requestout
- the output stream to write the request entity.IOException
Copyright © 2013 Oracle Corporation. All rights reserved.