public class ClientRequest extends OutboundMessageContext implements ClientRequestContext
OutboundMessageContext.StreamProvider| Modifier | Constructor and Description |
|---|---|
|
ClientRequest(ClientRequest original)
Copy constructor.
|
protected |
ClientRequest(URI requestUri,
ClientConfig clientConfig,
PropertiesDelegate propertiesDelegate)
Create new Jersey client request context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortWith(Response response) |
void |
accept(MediaType... types)
Add new accepted types to the message headers.
|
void |
accept(String... types)
Add new accepted types to the message headers.
|
void |
acceptLanguage(Locale... locales)
Add new accepted languages to the message headers.
|
void |
acceptLanguage(String... locales)
Add new accepted languages to the message headers.
|
void |
cacheControl(CacheControl cacheControl)
Add new cache control entry to the message headers.
|
void |
cookie(Cookie cookie)
Add new cookie to the message headers.
|
void |
encoding(String encoding)
Set message encoding.
|
Response |
getAbortResponse()
Get the request filter chain aborting response if set, or
null otherwise. |
JerseyClient |
getClient() |
Configuration |
getConfiguration() |
Map<String,Cookie> |
getCookies() |
String |
getMethod() |
Object |
getProperty(String name) |
Collection<String> |
getPropertyNames() |
URI |
getUri() |
MessageBodyWorkers |
getWorkers()
Get the message body workers associated with the request.
|
boolean |
isAsynchronous()
Returns true if the request is called asynchronously using
AsyncInvoker |
void |
language(Locale language)
Set message language.
|
void |
language(String language)
Set message language.
|
void |
removeProperty(String name) |
void |
setMethod(String method) |
void |
setProperty(String name,
Object object) |
void |
setUri(URI uri) |
void |
setWorkers(MessageBodyWorkers workers)
Set the message body workers associated with the request.
|
void |
type(MediaType type)
Set message content type.
|
void |
type(String type)
Set message content type.
|
void |
variant(Variant variant)
Set message content variant (type, language and encoding).
|
close, commitStream, getAcceptableLanguages, getAcceptableMediaTypes, getAllowedMethods, getDate, getEntity, getEntityAnnotations, getEntityClass, getEntityStream, getEntityTag, getEntityType, getHeaders, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinks, getLocation, getMediaType, getRequestCookies, getResponseCookies, getStringHeaders, hasEntity, hasLink, isCommitted, replaceHeaders, setEntity, setEntity, setEntity, setEntity, setEntityAnnotations, setEntityStream, setEntityType, setMediaType, setStreamProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAcceptableLanguages, getAcceptableMediaTypes, getDate, getEntity, getEntityAnnotations, getEntityClass, getEntityStream, getEntityType, getHeaders, getHeaderString, getLanguage, getMediaType, getStringHeaders, hasEntity, setEntity, setEntityStreamprotected ClientRequest(URI requestUri, ClientConfig clientConfig, PropertiesDelegate propertiesDelegate)
requestUri - request Uri.clientConfig - request configuration.propertiesDelegate - properties delegate.public ClientRequest(ClientRequest original)
original - original instance.public Object getProperty(String name)
getProperty in interface ClientRequestContextpublic Collection<String> getPropertyNames()
getPropertyNames in interface ClientRequestContextpublic void setProperty(String name, Object object)
setProperty in interface ClientRequestContextpublic void removeProperty(String name)
removeProperty in interface ClientRequestContextpublic URI getUri()
getUri in interface ClientRequestContextpublic void setUri(URI uri)
setUri in interface ClientRequestContextpublic String getMethod()
getMethod in interface ClientRequestContextpublic void setMethod(String method)
setMethod in interface ClientRequestContextpublic JerseyClient getClient()
getClient in interface ClientRequestContextpublic void abortWith(Response response)
abortWith in interface ClientRequestContextpublic Response getAbortResponse()
null otherwise.null otherwise.public Configuration getConfiguration()
getConfiguration in interface ClientRequestContextpublic Map<String,Cookie> getCookies()
getCookies in interface ClientRequestContextpublic MessageBodyWorkers getWorkers()
public void setWorkers(MessageBodyWorkers workers)
workers - message body workers.public void accept(MediaType... types)
types - accepted types to be added.public void accept(String... types)
types - accepted types to be added.public void acceptLanguage(Locale... locales)
locales - accepted languages to be added.public void acceptLanguage(String... locales)
locales - accepted languages to be added.public void cookie(Cookie cookie)
cookie - cookie to be added.public void cacheControl(CacheControl cacheControl)
cacheControl - cache control entry to be added.public void encoding(String encoding)
encoding - message encoding to be set.public void language(String language)
language - message language to be set.public void language(Locale language)
language - message language to be set.public void type(MediaType type)
type - message content type to be set.public void type(String type)
type - message content type to be set.public void variant(Variant variant)
variant - message content content variant (type, language and encoding)
to be set.public boolean isAsynchronous()
AsyncInvokerCopyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.