javax.ws.rs.client
Interface AsyncInvoker


public interface AsyncInvoker

Uniform interface for asynchronous invocation of HTTP methods.

Since:
2.0
Author:
Marek Potociar

Method Summary
 Future<Response> delete()
          Invoke HTTP DELETE method for the current request asynchronously.
<T> Future<T>
delete(Class<T> responseType)
          Invoke HTTP DELETE method for the current request asynchronously.
<T> Future<T>
delete(GenericType<T> responseType)
          Invoke HTTP DELETE method for the current request asynchronously.
<T> Future<T>
delete(InvocationCallback<T> callback)
          Invoke HTTP DELETE method for the current request asynchronously.
 Future<Response> get()
          Invoke HTTP GET method for the current request asynchronously.
<T> Future<T>
get(Class<T> responseType)
          Invoke HTTP GET method for the current request asynchronously.
<T> Future<T>
get(GenericType<T> responseType)
          Invoke HTTP GET method for the current request asynchronously.
<T> Future<T>
get(InvocationCallback<T> callback)
          Invoke HTTP GET method for the current request asynchronously.
 Future<Response> head()
          Invoke HTTP HEAD method for the current request asynchronously.
 Future<Response> head(InvocationCallback<Response> callback)
          Invoke HTTP HEAD method for the current request asynchronously.
 Future<Response> method(String name)
          Invoke an arbitrary method for the current request asynchronously.
<T> Future<T>
method(String name, Class<T> responseType)
          Invoke an arbitrary method for the current request asynchronously.
 Future<Response> method(String name, Entity<?> entity)
          Invoke an arbitrary method for the current request asynchronously.
<T> Future<T>
method(String name, Entity<?> entity, Class<T> responseType)
          Invoke an arbitrary method for the current request asynchronously.
<T> Future<T>
method(String name, Entity<?> entity, GenericType<T> responseType)
          Invoke an arbitrary method for the current request asynchronously.
<T> Future<T>
method(String name, Entity<?> entity, InvocationCallback<T> callback)
          Invoke an arbitrary method for the current request asynchronously.
<T> Future<T>
method(String name, GenericType<T> responseType)
          Invoke an arbitrary method for the current request asynchronously.
<T> Future<T>
method(String name, InvocationCallback<T> callback)
          Invoke an arbitrary method for the current request asynchronously.
 Future<Response> options()
          Invoke HTTP OPTIONS method for the current request asynchronously.
<T> Future<T>
options(Class<T> responseType)
          Invoke HTTP OPTIONS method for the current request asynchronously.
<T> Future<T>
options(GenericType<T> responseType)
          Invoke HTTP OPTIONS method for the current request asynchronously.
<T> Future<T>
options(InvocationCallback<T> callback)
          Invoke HTTP OPTIONS method for the current request asynchronously.
 Future<Response> post(Entity<?> entity)
          Invoke HTTP POST method for the current request asynchronously.
<T> Future<T>
post(Entity<?> entity, Class<T> responseType)
          Invoke HTTP POST method for the current request asynchronously.
<T> Future<T>
post(Entity<?> entity, GenericType<T> responseType)
          Invoke HTTP POST method for the current request asynchronously.
<T> Future<T>
post(Entity<?> entity, InvocationCallback<T> callback)
          Invoke HTTP POST method for the current request asynchronously.
 Future<Response> put(Entity<?> entity)
          Invoke HTTP PUT method for the current request asynchronously.
<T> Future<T>
put(Entity<?> entity, Class<T> responseType)
          Invoke HTTP PUT method for the current request asynchronously.
<T> Future<T>
put(Entity<?> entity, GenericType<T> responseType)
          Invoke HTTP PUT method for the current request asynchronously.
<T> Future<T>
put(Entity<?> entity, InvocationCallback<T> callback)
          Invoke HTTP PUT method for the current request asynchronously.
 Future<Response> trace(Entity<?> entity)
          Invoke HTTP TRACE method for the current request asynchronously.
<T> Future<T>
trace(Entity<?> entity, Class<T> responseType)
          Invoke HTTP TRACE method for the current request asynchronously.
<T> Future<T>
trace(Entity<?> entity, GenericType<T> responseType)
          Invoke HTTP TRACE method for the current request asynchronously.
<T> Future<T>
trace(Entity<?> entity, InvocationCallback<T> callback)
          Invoke HTTP TRACE method for the current request asynchronously.
 

Method Detail

get

Future<Response> get()
                     throws InvocationException
Invoke HTTP GET method for the current request asynchronously.

Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

get

<T> Future<T> get(Class<T> responseType)
              throws InvocationException
Invoke HTTP GET method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

get

<T> Future<T> get(GenericType<T> responseType)
              throws InvocationException
Invoke HTTP GET method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

get

<T> Future<T> get(InvocationCallback<T> callback)
Invoke HTTP GET method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
callback - asynchronous invocation callback.
Returns:
invocation response future.

put

Future<Response> put(Entity<?> entity)
                     throws InvocationException
Invoke HTTP PUT method for the current request asynchronously.

Parameters:
entity - request entity.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

put

<T> Future<T> put(Entity<?> entity,
                  Class<T> responseType)
              throws InvocationException
Invoke HTTP PUT method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

put

<T> Future<T> put(Entity<?> entity,
                  GenericType<T> responseType)
              throws InvocationException
Invoke HTTP PUT method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

put

<T> Future<T> put(Entity<?> entity,
                  InvocationCallback<T> callback)
Invoke HTTP PUT method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
callback - asynchronous invocation callback.
Returns:
invocation response future.

post

Future<Response> post(Entity<?> entity)
                      throws InvocationException
Invoke HTTP POST method for the current request asynchronously.

Parameters:
entity - request entity.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

post

<T> Future<T> post(Entity<?> entity,
                   Class<T> responseType)
               throws InvocationException
Invoke HTTP POST method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

post

<T> Future<T> post(Entity<?> entity,
                   GenericType<T> responseType)
               throws InvocationException
Invoke HTTP POST method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

post

<T> Future<T> post(Entity<?> entity,
                   InvocationCallback<T> callback)
Invoke HTTP POST method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
callback - asynchronous invocation callback.
Returns:
invocation response future.

delete

Future<Response> delete()
                        throws InvocationException
Invoke HTTP DELETE method for the current request asynchronously.

Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

delete

<T> Future<T> delete(Class<T> responseType)
                 throws InvocationException
Invoke HTTP DELETE method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

delete

<T> Future<T> delete(GenericType<T> responseType)
                 throws InvocationException
Invoke HTTP DELETE method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

delete

<T> Future<T> delete(InvocationCallback<T> callback)
Invoke HTTP DELETE method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
callback - asynchronous invocation callback.
Returns:
invocation response future.

head

Future<Response> head()
                      throws InvocationException
Invoke HTTP HEAD method for the current request asynchronously.

Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

head

Future<Response> head(InvocationCallback<Response> callback)
Invoke HTTP HEAD method for the current request asynchronously.

Parameters:
callback - asynchronous invocation callback.
Returns:
invocation response future.

options

Future<Response> options()
                         throws InvocationException
Invoke HTTP OPTIONS method for the current request asynchronously.

Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

options

<T> Future<T> options(Class<T> responseType)
                  throws InvocationException
Invoke HTTP OPTIONS method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

options

<T> Future<T> options(GenericType<T> responseType)
                  throws InvocationException
Invoke HTTP OPTIONS method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

options

<T> Future<T> options(InvocationCallback<T> callback)
Invoke HTTP OPTIONS method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
callback - asynchronous invocation callback.
Returns:
invocation response future.

trace

Future<Response> trace(Entity<?> entity)
                       throws InvocationException
Invoke HTTP TRACE method for the current request asynchronously.

Parameters:
entity - request entity.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

trace

<T> Future<T> trace(Entity<?> entity,
                    Class<T> responseType)
                throws InvocationException
Invoke HTTP TRACE method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

trace

<T> Future<T> trace(Entity<?> entity,
                    GenericType<T> responseType)
                throws InvocationException
Invoke HTTP TRACE method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

trace

<T> Future<T> trace(Entity<?> entity,
                    InvocationCallback<T> callback)
Invoke HTTP TRACE method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
callback - asynchronous invocation callback.
Returns:
invocation response future.

method

Future<Response> method(String name)
                        throws InvocationException
Invoke an arbitrary method for the current request asynchronously.

Parameters:
name - method name.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

method

<T> Future<T> method(String name,
                     Class<T> responseType)
                 throws InvocationException
Invoke an arbitrary method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
name - method name.
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

method

<T> Future<T> method(String name,
                     GenericType<T> responseType)
                 throws InvocationException
Invoke an arbitrary method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
name - method name.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

method

<T> Future<T> method(String name,
                     InvocationCallback<T> callback)
Invoke an arbitrary method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
name - method name.
callback - asynchronous invocation callback.
Returns:
invocation response future.

method

Future<Response> method(String name,
                        Entity<?> entity)
                        throws InvocationException
Invoke an arbitrary method for the current request asynchronously.

Parameters:
name - method name.
entity - request entity.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

method

<T> Future<T> method(String name,
                     Entity<?> entity,
                     Class<T> responseType)
                 throws InvocationException
Invoke an arbitrary method for the current request asynchronously.

Type Parameters:
T - response entity type.
Parameters:
name - method name.
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

method

<T> Future<T> method(String name,
                     Entity<?> entity,
                     GenericType<T> responseType)
                 throws InvocationException
Invoke an arbitrary method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
name - method name.
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response future.
Throws:
InvocationException - in case the invocation failed.

method

<T> Future<T> method(String name,
                     Entity<?> entity,
                     InvocationCallback<T> callback)
Invoke an arbitrary method for the current request asynchronously.

Type Parameters:
T - generic response entity type.
Parameters:
name - method name.
entity - request entity.
callback - asynchronous invocation callback.
Returns:
invocation response future.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.