|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jersey.api.client.filter.Filterable com.sun.jersey.api.client.AsyncWebResource
public class AsyncWebResource
An encapsulation of an asynchronous Web resource capable of building requests to send to the Web resource and processing responses returned from the Web resource.
An AsyncWebResource instance is obtained from the Client
.
The Web resource implements the AsyncUniformInterface
to invoke the HTTP
method on the Web resource. A client request may be built before invocation
on the uniform interface.
Methods to create a request and return a response are thread-safe. Methods that modify filters are not guaranteed to be thread-safe.
com.sun.jersey.api.client
Nested Class Summary | |
---|---|
class |
AsyncWebResource.Builder
The builder for building a ClientRequest instance and
handling the request using the UniformInterface . |
Method Summary | ||
---|---|---|
AsyncWebResource.Builder |
accept(MediaType... types)
Add acceptable media types. |
|
AsyncWebResource.Builder |
accept(java.lang.String... types)
Add acceptable media types. |
|
AsyncWebResource.Builder |
acceptLanguage(java.util.Locale... locales)
Add acceptable languages |
|
AsyncWebResource.Builder |
acceptLanguage(java.lang.String... locales)
Add acceptable languages |
|
AsyncWebResource.Builder |
cookie(Cookie cookie)
Add a cookie to be set. |
|
java.util.concurrent.Future<?> |
delete()
Invoke the DELETE method with no request entity or response. |
|
|
delete(java.lang.Class<T> c)
Invoke the DELETE method with no request entity that returns a response. |
|
|
delete(java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke the DELETE method with a request entity that returns a response. |
|
|
delete(GenericType<T> gt)
Invoke the DELETE method with a request entity that returns a response. |
|
|
delete(GenericType<T> gt,
java.lang.Object requestEntity)
Invoke the DELETE method with a request entity that returns a response. |
|
|
delete(ITypeListener<T> l)
Invoke the DELETE method. |
|
|
delete(ITypeListener<T> l,
java.lang.Object requestEntity)
Invoke the DELETE method. |
|
java.util.concurrent.Future<?> |
delete(java.lang.Object requestEntity)
Invoke the DELETE method with a request entity but no response. |
|
AsyncWebResource.Builder |
entity(java.lang.Object entity)
Set the request entity. |
|
AsyncWebResource.Builder |
entity(java.lang.Object entity,
MediaType type)
Set the request entity it's media type. |
|
AsyncWebResource.Builder |
entity(java.lang.Object entity,
java.lang.String type)
Set the request entity it's media type. |
|
boolean |
equals(java.lang.Object obj)
Compares this resource to the specified object. |
|
|
get(java.lang.Class<T> c)
Invoke the GET method. |
|
|
get(GenericType<T> gt)
Invoke the GET method. |
|
|
get(ITypeListener<T> l)
Invoke the GET method. |
|
UriBuilder |
getBuilder()
Deprecated. |
|
AsyncWebResource.Builder |
getRequestBuilder()
Get the ClientRequest builder. |
|
java.net.URI |
getURI()
Get the URI to the resource. |
|
UriBuilder |
getUriBuilder()
Get the URI builder to the resource. |
|
java.util.concurrent.Future<ClientResponse> |
handle(ClientRequest request,
FutureListener<ClientResponse> l)
Invoke an asynchronous client request. |
|
int |
hashCode()
Returns a hash code for this WebResource . |
|
java.util.concurrent.Future<ClientResponse> |
head()
Invoke the HEAD method. |
|
java.util.concurrent.Future<ClientResponse> |
head(ITypeListener<ClientResponse> l)
Invoke the HEAD method. |
|
AsyncWebResource.Builder |
header(java.lang.String name,
java.lang.Object value)
Add an HTTP header and value. |
|
java.util.concurrent.Future<?> |
method(java.lang.String method)
Invoke a HTTP method with no request entity or response. |
|
|
method(java.lang.String method,
java.lang.Class<T> c)
Invoke a HTTP method with no request entity that returns a response. |
|
|
method(java.lang.String method,
java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity that returns a response. |
|
|
method(java.lang.String method,
GenericType<T> gt)
Invoke a HTTP method with no request entity that returns a response. |
|
|
method(java.lang.String method,
GenericType<T> gt,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity that returns a response. |
|
|
method(java.lang.String method,
ITypeListener<T> l)
Invoke a HTTP method with no request entity that returns a response. |
|
|
method(java.lang.String method,
ITypeListener<T> l,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity that returns a response. |
|
java.util.concurrent.Future<?> |
method(java.lang.String method,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity but no response. |
|
|
options(java.lang.Class<T> c)
Invoke the OPTIONS method. |
|
|
options(GenericType<T> gt)
Invoke the OPTIONS method. |
|
|
options(ITypeListener<T> l)
Invoke the OPTIONS method. |
|
AsyncWebResource |
path(java.lang.String path)
Create a new AsyncWebResource from this web resource with an additional path added to the URI of this web resource. |
|
java.util.concurrent.Future<?> |
post()
Invoke the POST method with no request entity or response. |
|
|
post(java.lang.Class<T> c)
Invoke the POST method with no request entity that returns a response. |
|
|
post(java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke the POST method with a request entity that returns a response. |
|
|
post(GenericType<T> gt)
Invoke the POST method with a request entity that returns a response. |
|
|
post(GenericType<T> gt,
java.lang.Object requestEntity)
Invoke the POST method with a request entity that returns a response. |
|
|
post(ITypeListener<T> l)
Invoke the POST method. |
|
|
post(ITypeListener<T> l,
java.lang.Object requestEntity)
Invoke the POST method. |
|
java.util.concurrent.Future<?> |
post(java.lang.Object requestEntity)
Invoke the POST method with a request entity but no response. |
|
java.util.concurrent.Future<?> |
put()
Invoke the PUT method with no request entity or response. |
|
|
put(java.lang.Class<T> c)
Invoke the PUT method with no request entity that returns a response. |
|
|
put(java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke the PUT method with a request entity that returns a response. |
|
|
put(GenericType<T> gt)
Invoke the PUT method with a request entity that returns a response. |
|
|
put(GenericType<T> gt,
java.lang.Object requestEntity)
Invoke the PUT method with a request entity that returns a response. |
|
|
put(ITypeListener<T> l)
Invoke the PUT method. |
|
|
put(ITypeListener<T> l,
java.lang.Object requestEntity)
Invoke the PUT method. |
|
java.util.concurrent.Future<?> |
put(java.lang.Object requestEntity)
Invoke the PUT method with a request entity but no response. |
|
AsyncWebResource |
queryParam(java.lang.String key,
java.lang.String value)
Create a new WebResource from this web resource with an additional query parameter added to the URI of this web resource. |
|
AsyncWebResource |
queryParams(MultivaluedMap<java.lang.String,java.lang.String> params)
Create a new WebResource from this web resource with additional query parameters added to the URI of this web resource. |
|
java.lang.String |
toString()
|
|
AsyncWebResource.Builder |
type(MediaType type)
Set the media type. |
|
AsyncWebResource.Builder |
type(java.lang.String type)
Set the media type. |
|
AsyncWebResource |
uri(java.net.URI uri)
Create a new AsyncWebResource from this web resource. |
Methods inherited from class com.sun.jersey.api.client.filter.Filterable |
---|
addFilter, getHeadHandler, isFilterPreset, removeAllFilters, removeFilter |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.net.URI getURI()
@Deprecated public UriBuilder getBuilder()
public UriBuilder getUriBuilder()
public AsyncWebResource.Builder getRequestBuilder()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
WebResource
.
The hash code is the hash code of URI of this
WebResource
.
hashCode
in class java.lang.Object
WebResource
.public boolean equals(java.lang.Object obj)
The result is true if and only if the argument is not null and is a
AsyncWebResource
object whose URI is equal to the URI of this
AsyncWebResource
.
equals
in class java.lang.Object
obj
- the object to compare this AsyncWebResource
against.
AsyncWebResource
are equal; false otherwise.public java.util.concurrent.Future<ClientResponse> head()
AsyncUniformInterface
head
in interface AsyncUniformInterface
public java.util.concurrent.Future<ClientResponse> head(ITypeListener<ClientResponse> l)
AsyncUniformInterface
head
in interface AsyncUniformInterface
l
- the listener to receive asynchronous callbacks.
public <T> java.util.concurrent.Future<T> options(java.lang.Class<T> c)
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
options
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.
c
.public <T> java.util.concurrent.Future<T> options(GenericType<T> gt)
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
options
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.
public <T> java.util.concurrent.Future<T> options(ITypeListener<T> l)
AsyncUniformInterface
options
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.
public <T> java.util.concurrent.Future<T> get(java.lang.Class<T> c) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
get
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> get(GenericType<T> gt) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
get
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> get(ITypeListener<T> l)
AsyncUniformInterface
get
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.
public java.util.concurrent.Future<?> put() throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
put
in interface AsyncUniformInterface
UniformInterfaceException
public java.util.concurrent.Future<?> put(java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
put
in interface AsyncUniformInterface
requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
put
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> put(GenericType<T> gt) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
put
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> put(ITypeListener<T> l)
AsyncUniformInterface
put
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.
public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
put
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.requestEntity
- the request entity.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> put(GenericType<T> gt, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
put
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> put(ITypeListener<T> l, java.lang.Object requestEntity)
AsyncUniformInterface
put
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.requestEntity
- the request entity.
public java.util.concurrent.Future<?> post() throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
post
in interface AsyncUniformInterface
UniformInterfaceException
public java.util.concurrent.Future<?> post(java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
post
in interface AsyncUniformInterface
requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
post
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> post(GenericType<T> gt) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
post
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> post(ITypeListener<T> l)
AsyncUniformInterface
post
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.
public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
post
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.requestEntity
- the request entity.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> post(GenericType<T> gt, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
post
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> post(ITypeListener<T> l, java.lang.Object requestEntity)
AsyncUniformInterface
post
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.requestEntity
- the request entity.
public java.util.concurrent.Future<?> delete() throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
delete
in interface AsyncUniformInterface
UniformInterfaceException
public java.util.concurrent.Future<?> delete(java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
delete
in interface AsyncUniformInterface
requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
delete
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> delete(GenericType<T> gt) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
delete
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> delete(ITypeListener<T> l)
AsyncUniformInterface
delete
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.
public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
delete
in interface AsyncUniformInterface
T
- the type of the response.c
- the type of the returned response.requestEntity
- the request entity.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> delete(GenericType<T> gt, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
delete
in interface AsyncUniformInterface
T
- the type of the response.gt
- the generic type of the returned response.requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> delete(ITypeListener<T> l, java.lang.Object requestEntity)
AsyncUniformInterface
delete
in interface AsyncUniformInterface
T
- the type of the response.l
- the listener to receive asynchronous callbacks.requestEntity
- the request entity.
public java.util.concurrent.Future<?> method(java.lang.String method) throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
method
in interface AsyncUniformInterface
method
- the HTTP method.
UniformInterfaceException
public java.util.concurrent.Future<?> method(java.lang.String method, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300.
method
in interface AsyncUniformInterface
method
- the HTTP method.requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> method(java.lang.String method, java.lang.Class<T> c) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
method
in interface AsyncUniformInterface
T
- the type of the response.method
- the HTTP method.c
- the type of the returned response.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> method(java.lang.String method, GenericType<T> gt) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
method
in interface AsyncUniformInterface
T
- the type of the response.method
- the HTTP method.gt
- the generic type of the returned response.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> method(java.lang.String method, ITypeListener<T> l)
AsyncUniformInterface
method
in interface AsyncUniformInterface
T
- the type of the response.method
- the HTTP method.l
- the listener to receive asynchronous callbacks.
public <T> java.util.concurrent.Future<T> method(java.lang.String method, java.lang.Class<T> c, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
c
is not the type ClientResponse
.
method
in interface AsyncUniformInterface
T
- the type of the response.method
- the HTTP method.c
- the type of the returned response.requestEntity
- the request entity.
c
.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> method(java.lang.String method, GenericType<T> gt, java.lang.Object requestEntity) throws UniformInterfaceException
AsyncUniformInterface
The Future.get()
method will throw a UniformInterfaceException
if the status of the HTTP response is greater than or equal to 300 and
gt
is not the type ClientResponse
.
method
in interface AsyncUniformInterface
T
- the type of the response.method
- the HTTP method.gt
- the generic type of the returned response.requestEntity
- the request entity.
UniformInterfaceException
public <T> java.util.concurrent.Future<T> method(java.lang.String method, ITypeListener<T> l, java.lang.Object requestEntity)
AsyncUniformInterface
method
in interface AsyncUniformInterface
T
- the type of the response.method
- the HTTP method.l
- the listener to receive asynchronous callbacks.requestEntity
- the request entity.
public AsyncWebResource.Builder entity(java.lang.Object entity)
RequestBuilder
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
in interface RequestBuilder<AsyncWebResource.Builder>
entity
- the request entity
public AsyncWebResource.Builder entity(java.lang.Object entity, MediaType type)
RequestBuilder
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
in interface RequestBuilder<AsyncWebResource.Builder>
entity
- the request entitytype
- the media type
public AsyncWebResource.Builder entity(java.lang.Object entity, java.lang.String type)
RequestBuilder
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
in interface RequestBuilder<AsyncWebResource.Builder>
entity
- the request entitytype
- the media type
public AsyncWebResource.Builder type(MediaType type)
RequestBuilder
type
in interface RequestBuilder<AsyncWebResource.Builder>
type
- the media type
public AsyncWebResource.Builder type(java.lang.String type)
RequestBuilder
type
in interface RequestBuilder<AsyncWebResource.Builder>
type
- the media type
public AsyncWebResource.Builder accept(MediaType... types)
RequestBuilder
accept
in interface RequestBuilder<AsyncWebResource.Builder>
types
- an array of the acceptable media types
public AsyncWebResource.Builder accept(java.lang.String... types)
RequestBuilder
accept
in interface RequestBuilder<AsyncWebResource.Builder>
types
- an array of the acceptable media types
public AsyncWebResource.Builder acceptLanguage(java.util.Locale... locales)
RequestBuilder
acceptLanguage
in interface RequestBuilder<AsyncWebResource.Builder>
locales
- an array of the acceptable languages
public AsyncWebResource.Builder acceptLanguage(java.lang.String... locales)
RequestBuilder
acceptLanguage
in interface RequestBuilder<AsyncWebResource.Builder>
locales
- an array of the acceptable languages
public AsyncWebResource.Builder cookie(Cookie cookie)
RequestBuilder
cookie
in interface RequestBuilder<AsyncWebResource.Builder>
cookie
- to be set.
public AsyncWebResource.Builder header(java.lang.String name, java.lang.Object value)
RequestBuilder
header
in interface RequestBuilder<AsyncWebResource.Builder>
name
- the HTTP header name.value
- the HTTP header value.
public AsyncWebResource path(java.lang.String path)
Any filters on this web resource are inherited. Removal of filters may cause undefined behaviour.
path
- the additional path.
public AsyncWebResource uri(java.net.URI uri)
If the URI contains a path component and the path starts with a '/' then the path of this web resource URI is replaced. Otherwise the path is appended.
If the URI contains query parameters then those query parameters will replace the query parameters (if any) of this web resource.
Any filters on this web resource are inherited. Removal of filters may cause undefined behaviour.
uri
- the URI.
public AsyncWebResource queryParam(java.lang.String key, java.lang.String value)
key
- the query parameter namevalue
- the query parameter value
public AsyncWebResource queryParams(MultivaluedMap<java.lang.String,java.lang.String> params)
params
- the query parameters.
public java.util.concurrent.Future<ClientResponse> handle(ClientRequest request, FutureListener<ClientResponse> l)
AsyncClientHandler
handle
in interface AsyncClientHandler
request
- the client request.l
- the future listener to receive a completed Future with the
client response.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |