|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.api.client.Filterable
com.sun.jersey.api.client.AsyncWebResource
public final 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.
The Web resource implements the UniformInterface
to invoke the HTTP
method on the Web resource. A client request may be built before invocation
on the uniform interface.
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(javax.ws.rs.core.MediaType... types)
Add acceptable media types. |
|
AsyncWebResource.Builder |
accept(java.lang.String... types)
Add acceptable media types. |
|
AsyncWebResource.Builder |
cookie(javax.ws.rs.core.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. |
|
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,
javax.ws.rs.core.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. |
|
|
get(java.lang.Class<T> c)
Invoke the GET method. |
|
javax.ws.rs.core.UriBuilder |
getBuilder()
Get the URI builder to the resource. |
|
java.net.URI |
getURI()
Get the URI to the resource. |
|
java.util.concurrent.Future<ClientResponse> |
head()
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. |
|
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. |
|
AsyncWebResource.Builder |
path(java.lang.String path)
Start building from an additional path from the URI to the 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. |
|
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. |
|
java.util.concurrent.Future<?> |
put(java.lang.Object requestEntity)
Invoke the PUT method with a request entity but no response. |
|
AsyncWebResource.Builder |
type(javax.ws.rs.core.MediaType type)
Set the media type. |
|
AsyncWebResource.Builder |
type(java.lang.String type)
Set the media type. |
|
AsyncWebResource.Builder |
uri(java.net.URI uri)
Start building from a URI. |
Methods inherited from class com.sun.jersey.api.client.Filterable |
---|
addFilter, getHeadHandler, removeAllFilters, removeFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.net.URI getURI()
public javax.ws.rs.core.UriBuilder getBuilder()
public java.util.concurrent.Future<ClientResponse> head()
AsyncUniformInterface
head
in interface AsyncUniformInterface
public <T> java.util.concurrent.Future<T> options(java.lang.Class<T> c)
AsyncUniformInterface
options
in interface AsyncUniformInterface
c
- the type of the returned response.
c
.public <T> java.util.concurrent.Future<T> get(java.lang.Class<T> c)
AsyncUniformInterface
get
in interface AsyncUniformInterface
c
- the type of the returned response.
c
.public java.util.concurrent.Future<?> put()
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
put
in interface AsyncUniformInterface
public java.util.concurrent.Future<?> put(java.lang.Object requestEntity)
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
put
in interface AsyncUniformInterface
requestEntity
- the request entity.public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c)
AsyncUniformInterface
put
in interface AsyncUniformInterface
c
- the type of the returned response.
c
.public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c, java.lang.Object requestEntity)
AsyncUniformInterface
put
in interface AsyncUniformInterface
c
- the type of the returned response.requestEntity
- the request entity.
c
.public java.util.concurrent.Future<?> post()
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
post
in interface AsyncUniformInterface
public java.util.concurrent.Future<?> post(java.lang.Object requestEntity)
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
post
in interface AsyncUniformInterface
requestEntity
- the request entity.public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c)
AsyncUniformInterface
post
in interface AsyncUniformInterface
c
- the type of the returned response.
c
.public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c, java.lang.Object requestEntity)
AsyncUniformInterface
post
in interface AsyncUniformInterface
c
- the type of the returned response.requestEntity
- the request entity.
c
.public java.util.concurrent.Future<?> delete()
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
delete
in interface AsyncUniformInterface
public java.util.concurrent.Future<?> delete(java.lang.Object requestEntity)
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
delete
in interface AsyncUniformInterface
requestEntity
- the request entity.public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c)
AsyncUniformInterface
delete
in interface AsyncUniformInterface
c
- the type of the returned response.
c
.public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c, java.lang.Object requestEntity)
AsyncUniformInterface
delete
in interface AsyncUniformInterface
c
- the type of the returned response.requestEntity
- the request entity.
c
.public java.util.concurrent.Future<?> method(java.lang.String method)
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
method
in interface AsyncUniformInterface
method
- the HTTP method.public java.util.concurrent.Future<?> method(java.lang.String method, java.lang.Object requestEntity)
AsyncUniformInterface
If the status code is less than 300 and a representation is present then that representation is ignored.
method
in interface AsyncUniformInterface
method
- the HTTP method.requestEntity
- the request entity.public <T> java.util.concurrent.Future<T> method(java.lang.String method, java.lang.Class<T> c)
AsyncUniformInterface
method
in interface AsyncUniformInterface
method
- the HTTP method.c
- the type of the returned response.
c
.public <T> java.util.concurrent.Future<T> method(java.lang.String method, java.lang.Class<T> c, java.lang.Object requestEntity)
AsyncUniformInterface
method
in interface AsyncUniformInterface
method
- the HTTP method.c
- the type of the returned response.requestEntity
- the request entity.
c
.public AsyncWebResource.Builder entity(java.lang.Object entity)
RequestBuilder
entity
in interface RequestBuilder<AsyncWebResource.Builder>
entity
- the request entity
public AsyncWebResource.Builder entity(java.lang.Object entity, javax.ws.rs.core.MediaType type)
RequestBuilder
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
entity
in interface RequestBuilder<AsyncWebResource.Builder>
entity
- the request entitytype
- the media type
public AsyncWebResource.Builder type(javax.ws.rs.core.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(javax.ws.rs.core.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 cookie(javax.ws.rs.core.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.Builder path(java.lang.String path)
path
- the additional path.
public AsyncWebResource.Builder uri(java.net.URI uri)
If the URI contains a path component and the path starts with a '/' then the path of the resource proxy URI is replaced. Otherise the path is appended to the path of the resource proxy URI.
If the URI contains query parameters then those query parameters will replace the query parameters (if any) of the resource proxy URI.
uri
- the URI.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |