Top Description Methods
javax.ws.rs.client

public Interface RxInvoker<T>

Known Direct Subinterfaces
javax.ws.rs.client.CompletionStageRxInvoker
Type Parameters
<T>
a type representing the asynchronous computation.
Imports
javax.ws.rs.core.GenericType

Uniform interface for reactive invocation of HTTP methods. All reactive invokers in JAX-RS must implement this interface. The type parameter T represents the Java type of an asynchronous computation. All JAX-RS implementations MUST support the default reactive invoker based on java.util.concurrent.CompletionStage.
Authors
Marek Potociar, Santiago Pericas-Geertsen
Since
2.1
See Also
javax.ws.rs.client.CompletionStageRxInvoker

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

invocation response wrapped in the completion aware type.
delete
()

Invoke HTTP DELETE method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
delete
(Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke HTTP DELETE method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
delete
(GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke HTTP DELETE method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type.
get
()

Invoke HTTP GET method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
get
(Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke HTTP GET method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
get
(GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke HTTP GET method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type.
head
()

Invoke HTTP HEAD method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type..
method
(String
method name.
name
)

Invoke an arbitrary method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type..
method
(String
method name.
name
,
Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke an arbitrary method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type..
method
(String
method name.
name
,
GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke an arbitrary method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type..
method
(String
method name.
name
,
Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
)

Invoke an arbitrary method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type..
method
(String
method name.
name
,
Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
,
Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke an arbitrary method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type..
method
(String
method name.
name
,
Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
,
GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke an arbitrary method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type.
options
()

Invoke HTTP OPTIONS method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
options
(Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke HTTP OPTIONS method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
options
(GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke HTTP OPTIONS method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type.
post
(Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
)

Invoke HTTP POST method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
post
(Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
,
Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke HTTP POST method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
post
(Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
,
GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke HTTP POST method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type.
put
(Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
)

Invoke HTTP PUT method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
put
(Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
,
Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke HTTP PUT method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
put
(Entity<?>
request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
entity
,
GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke HTTP PUT method for the current request.

public T

Returns:

invocation response wrapped in the completion aware type.
trace
()

Invoke HTTP TRACE method for the current request.

public <
response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
trace
(Class<R>
Java type the response entity will be converted to.
responseType
)

Invoke HTTP TRACE method for the current request.

public <
generic response entity type.
R
>
T

Returns:

invocation response wrapped in the completion aware type.
trace
(GenericType<R>
representation of a generic Java type the response entity will be converted to.
responseType
)

Invoke HTTP TRACE method for the current request.

Method Detail

deleteback to summary
public T delete()

Invoke HTTP DELETE method for the current request.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
deleteback to summary
public <R> T delete(Class<R> responseType)

Invoke HTTP DELETE method for the current request.

Parameters
<R>
response entity type.
responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
deleteback to summary
public <R> T delete(GenericType<R> responseType)

Invoke HTTP DELETE method for the current request.

Parameters
<R>
generic response entity type.
responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
getback to summary
public T get()

Invoke HTTP GET method for the current request.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
getback to summary
public <R> T get(Class<R> responseType)

Invoke HTTP GET method for the current request.

Parameters
<R>
response entity type.
responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
getback to summary
public <R> T get(GenericType<R> responseType)

Invoke HTTP GET method for the current request.

Parameters
<R>
generic response entity type.
responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
headback to summary
public T head()

Invoke HTTP HEAD method for the current request.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
methodback to summary
public T method(String name)

Invoke an arbitrary method for the current request.

Parameters
name:String

method name.

Returns:T

invocation response wrapped in the completion aware type..

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
methodback to summary
public <R> T method(String name, Class<R> responseType)

Invoke an arbitrary method for the current request.

Parameters
<R>
response entity type.
name:String

method name.

responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type..

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
methodback to summary
public <R> T method(String name, GenericType<R> responseType)

Invoke an arbitrary method for the current request.

Parameters
<R>
generic response entity type.
name:String

method name.

responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type..

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
methodback to summary
public T method(String name, Entity<?> entity)

Invoke an arbitrary method for the current request.

Parameters
name:String

method name.

entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

Returns:T

invocation response wrapped in the completion aware type..

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
methodback to summary
public <R> T method(String name, Entity<?> entity, Class<R> responseType)

Invoke an arbitrary method for the current request.

Parameters
<R>
response entity type.
name:String

method name.

entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type..

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
methodback to summary
public <R> T method(String name, Entity<?> entity, GenericType<R> responseType)

Invoke an arbitrary method for the current request.

Parameters
<R>
generic response entity type.
name:String

method name.

entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type..

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
optionsback to summary
public T options()

Invoke HTTP OPTIONS method for the current request.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
optionsback to summary
public <R> T options(Class<R> responseType)

Invoke HTTP OPTIONS method for the current request.

Parameters
<R>
response entity type.
responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
optionsback to summary
public <R> T options(GenericType<R> responseType)

Invoke HTTP OPTIONS method for the current request.

Parameters
<R>
generic response entity type.
responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
postback to summary
public T post(Entity<?> entity)

Invoke HTTP POST method for the current request.

Parameters
entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
postback to summary
public <R> T post(Entity<?> entity, Class<R> responseType)

Invoke HTTP POST method for the current request.

Parameters
<R>
response entity type.
entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
postback to summary
public <R> T post(Entity<?> entity, GenericType<R> responseType)

Invoke HTTP POST method for the current request.

Parameters
<R>
generic response entity type.
entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
putback to summary
public T put(Entity<?> entity)

Invoke HTTP PUT method for the current request.

Parameters
entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
putback to summary
public <R> T put(Entity<?> entity, Class<R> responseType)

Invoke HTTP PUT method for the current request.

Parameters
<R>
response entity type.
entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
putback to summary
public <R> T put(Entity<?> entity, GenericType<R> responseType)

Invoke HTTP PUT method for the current request.

Parameters
<R>
generic response entity type.
entity:Entity<?>

request entity, including it's full javax.ws.rs.core.Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.

responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
traceback to summary
public T trace()

Invoke HTTP TRACE method for the current request.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
traceback to summary
public <R> T trace(Class<R> responseType)

Invoke HTTP TRACE method for the current request.

Parameters
<R>
response entity type.
responseType:Class<R>

Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.
traceback to summary
public <R> T trace(GenericType<R> responseType)

Invoke HTTP TRACE method for the current request.

Parameters
<R>
generic response entity type.
responseType:GenericType<R>

representation of a generic Java type the response entity will be converted to.

Returns:T

invocation response wrapped in the completion aware type.

Exceptions
ResponseProcessingException:
in case processing of a received HTTP response fails (e.g. in a filter or during conversion of the response entity data to an instance of a particular Java type).
ProcessingException:
in case the request processing or subsequent I/O operation fails.
WebApplicationException:
in case the response status code of the response returned by the server is not successful and the specified response type is not javax.ws.rs.core.Response.