|
||||||||||
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.AsyncViewResource
public class AsyncViewResource
Nested Class Summary | |
---|---|
class |
AsyncViewResource.Builder
The builder for building a ClientRequest instance and
handling the request using the UniformInterface . |
Constructor Summary | |
---|---|
protected |
AsyncViewResource(AsyncViewResource that,
UriBuilder ub)
|
protected |
AsyncViewResource(Client c,
java.net.URI u)
|
Method Summary | ||
---|---|---|
AsyncViewResource.Builder |
accept(MediaType... types)
Add acceptable media types. |
|
AsyncViewResource.Builder |
accept(java.lang.String... types)
Add acceptable media types. |
|
AsyncViewResource.Builder |
acceptLanguage(java.util.Locale... locales)
Add acceptable languages |
|
AsyncViewResource.Builder |
acceptLanguage(java.lang.String... locales)
Add acceptable languages |
|
AsyncViewResource.Builder |
cookie(Cookie cookie)
Add a cookie to be set. |
|
|
delete(java.lang.Class<T> c)
|
|
|
delete(java.lang.Class<T> c,
java.lang.Object requestEntity)
|
|
|
delete(T t)
|
|
|
delete(T t,
java.lang.Object requestEntity)
|
|
AsyncViewResource.Builder |
entity(java.lang.Object entity)
Set the request entity. |
|
AsyncViewResource.Builder |
entity(java.lang.Object entity,
MediaType type)
Set the request entity with its media type. |
|
AsyncViewResource.Builder |
entity(java.lang.Object entity,
java.lang.String type)
Set the request entity with its media type. |
|
boolean |
equals(java.lang.Object obj)
Compares this resource to the specified object. |
|
|
get(java.lang.Class<T> c)
|
|
|
get(T t)
|
|
AsyncViewResource.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 . |
|
|
head(java.lang.Class<T> c)
|
|
|
head(T t)
|
|
AsyncViewResource.Builder |
header(java.lang.String name,
java.lang.Object value)
Add an HTTP header and value. |
|
|
method(java.lang.String method,
java.lang.Class<T> c)
|
|
|
method(java.lang.String method,
java.lang.Class<T> c,
java.lang.Object requestEntity)
|
|
|
method(java.lang.String method,
T t)
|
|
|
method(java.lang.String method,
T t,
java.lang.Object requestEntity)
|
|
|
options(java.lang.Class<T> c)
|
|
|
options(T t)
|
|
AsyncViewResource |
path(java.lang.String path)
Create a new WebResource from this web resource with an additional path added to the URI of this web resource. |
|
|
post(java.lang.Class<T> c)
|
|
|
post(java.lang.Class<T> c,
java.lang.Object requestEntity)
|
|
|
post(T t)
|
|
|
post(T t,
java.lang.Object requestEntity)
|
|
|
put(java.lang.Class<T> c)
|
|
|
put(java.lang.Class<T> c,
java.lang.Object requestEntity)
|
|
|
put(T t)
|
|
|
put(T t,
java.lang.Object requestEntity)
|
|
AsyncViewResource |
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. |
|
AsyncViewResource |
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()
|
|
AsyncViewResource.Builder |
type(MediaType type)
Set the media type. |
|
AsyncViewResource.Builder |
type(java.lang.String type)
Set the media type. |
|
AsyncViewResource |
uri(java.net.URI uri)
Create a new WebResource from this web resource. |
Methods inherited from class com.sun.jersey.api.client.filter.Filterable |
---|
addFilter, getHeadHandler, isFilterPresent, isFilterPreset, removeAllFilters, removeFilter |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected AsyncViewResource(Client c, java.net.URI u)
protected AsyncViewResource(AsyncViewResource that, UriBuilder ub)
Method Detail |
---|
public java.net.URI getURI()
public UriBuilder getUriBuilder()
public AsyncViewResource.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
WebResource
object whose URI is equal to the URI of this
WebResource
.
equals
in class java.lang.Object
obj
- the object to compare this WebResource
against.
WebResource
are equal; false otherwise.public <T> java.util.concurrent.Future<T> head(java.lang.Class<T> c)
head
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> head(T t)
head
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> options(java.lang.Class<T> c)
options
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> options(T t)
options
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> get(java.lang.Class<T> c)
get
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> get(T t)
get
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c)
put
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> put(T t)
put
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c, java.lang.Object requestEntity)
put
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> put(T t, java.lang.Object requestEntity)
put
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c)
post
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> post(T t)
post
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c, java.lang.Object requestEntity)
post
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> post(T t, java.lang.Object requestEntity)
post
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c)
delete
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> delete(T t)
delete
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c, java.lang.Object requestEntity)
delete
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> delete(T t, java.lang.Object requestEntity)
delete
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> method(java.lang.String method, java.lang.Class<T> c)
method
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> method(java.lang.String method, T t)
method
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> method(java.lang.String method, java.lang.Class<T> c, java.lang.Object requestEntity)
method
in interface AsyncViewUniformInterface
public <T> java.util.concurrent.Future<T> method(java.lang.String method, T t, java.lang.Object requestEntity)
method
in interface AsyncViewUniformInterface
public AsyncViewResource.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<AsyncViewResource.Builder>
entity
- the request entity
public AsyncViewResource.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<AsyncViewResource.Builder>
entity
- the request entitytype
- the media type
public AsyncViewResource.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<AsyncViewResource.Builder>
entity
- the request entitytype
- the media type
public AsyncViewResource.Builder type(MediaType type)
RequestBuilder
type
in interface RequestBuilder<AsyncViewResource.Builder>
type
- the media type
public AsyncViewResource.Builder type(java.lang.String type)
RequestBuilder
type
in interface RequestBuilder<AsyncViewResource.Builder>
type
- the media type
public AsyncViewResource.Builder accept(MediaType... types)
RequestBuilder
accept
in interface RequestBuilder<AsyncViewResource.Builder>
types
- an array of the acceptable media types
public AsyncViewResource.Builder accept(java.lang.String... types)
RequestBuilder
accept
in interface RequestBuilder<AsyncViewResource.Builder>
types
- an array of the acceptable media types
public AsyncViewResource.Builder acceptLanguage(java.util.Locale... locales)
RequestBuilder
acceptLanguage
in interface RequestBuilder<AsyncViewResource.Builder>
locales
- an array of the acceptable languages
public AsyncViewResource.Builder acceptLanguage(java.lang.String... locales)
RequestBuilder
acceptLanguage
in interface RequestBuilder<AsyncViewResource.Builder>
locales
- an array of the acceptable languages
public AsyncViewResource.Builder cookie(Cookie cookie)
RequestBuilder
cookie
in interface RequestBuilder<AsyncViewResource.Builder>
cookie
- to be set.
public AsyncViewResource.Builder header(java.lang.String name, java.lang.Object value)
RequestBuilder
header
in interface RequestBuilder<AsyncViewResource.Builder>
name
- the HTTP header name.value
- the HTTP header value.
public AsyncViewResource 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 AsyncViewResource 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 AsyncViewResource queryParam(java.lang.String key, java.lang.String value)
key
- the query parameter namevalue
- the query parameter value
public AsyncViewResource 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 |