T
- the asynchronous/event-based completion aware type. The given type should be parametrized with the actual
response type.public abstract class AbstractRxInvoker<T> extends Object implements RxInvoker<T>
reactive invoker
. Extensions of this class are
supposed to implement RxInvoker.method(String, javax.ws.rs.client.Entity, Class)
and
RxInvoker.method(String, javax.ws.rs.client.Entity, javax.ws.rs.core.GenericType)
methods to which implementations of the rest
of the methods from the contract delegate to.Constructor and Description |
---|
AbstractRxInvoker(javax.ws.rs.client.Invocation.Builder builder,
ExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
T |
delete()
Invoke HTTP DELETE method for the current request.
|
<R> T |
delete(Class<R> responseType)
Invoke HTTP DELETE method for the current request.
|
<R> T |
delete(javax.ws.rs.core.GenericType<R> responseType)
Invoke HTTP DELETE method for the current request.
|
T |
get()
Invoke HTTP GET method for the current request.
|
<R> T |
get(Class<R> responseType)
Invoke HTTP GET method for the current request.
|
<R> T |
get(javax.ws.rs.core.GenericType<R> responseType)
Invoke HTTP GET method for the current request.
|
protected javax.ws.rs.client.Invocation.Builder |
getBuilder()
Return invocation builder this reactive invoker was initialized with.
|
protected ExecutorService |
getExecutorService()
Return executorService service this reactive invoker was initialized with.
|
T |
head()
Invoke HTTP HEAD method for the current request.
|
T |
method(String name)
Invoke an arbitrary method for the current request.
|
<R> T |
method(String name,
Class<R> responseType)
Invoke an arbitrary method for the current request.
|
T |
method(String name,
javax.ws.rs.client.Entity<?> entity)
Invoke an arbitrary method for the current request.
|
<R> T |
method(String name,
javax.ws.rs.core.GenericType<R> responseType)
Invoke an arbitrary method for the current request.
|
T |
options()
Invoke HTTP OPTIONS method for the current request.
|
<R> T |
options(Class<R> responseType)
Invoke HTTP OPTIONS method for the current request.
|
<R> T |
options(javax.ws.rs.core.GenericType<R> responseType)
Invoke HTTP OPTIONS method for the current request.
|
T |
post(javax.ws.rs.client.Entity<?> entity)
Invoke HTTP POST method for the current request.
|
<R> T |
post(javax.ws.rs.client.Entity<?> entity,
Class<R> clazz)
Invoke HTTP POST method for the current request.
|
<R> T |
post(javax.ws.rs.client.Entity<?> entity,
javax.ws.rs.core.GenericType<R> type)
Invoke HTTP POST method for the current request.
|
T |
put(javax.ws.rs.client.Entity<?> entity)
Invoke HTTP PUT method for the current request.
|
<R> T |
put(javax.ws.rs.client.Entity<?> entity,
Class<R> clazz)
Invoke HTTP PUT method for the current request.
|
<R> T |
put(javax.ws.rs.client.Entity<?> entity,
javax.ws.rs.core.GenericType<R> type)
Invoke HTTP PUT method for the current request.
|
T |
trace()
Invoke HTTP TRACE method for the current request.
|
<R> T |
trace(Class<R> responseType)
Invoke HTTP OPTIONS method for the current request.
|
<R> T |
trace(javax.ws.rs.core.GenericType<R> responseType)
Invoke HTTP TRACE method for the current request.
|
public AbstractRxInvoker(javax.ws.rs.client.Invocation.Builder builder, ExecutorService executor)
protected javax.ws.rs.client.Invocation.Builder getBuilder()
protected ExecutorService getExecutorService()
null
.public T get()
RxInvoker
public <R> T get(Class<R> responseType)
RxInvoker
public <R> T get(javax.ws.rs.core.GenericType<R> responseType)
RxInvoker
public T put(javax.ws.rs.client.Entity<?> entity)
RxInvoker
put
in interface RxInvoker<T>
entity
- request entity, including it's full 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.public <R> T put(javax.ws.rs.client.Entity<?> entity, Class<R> clazz)
RxInvoker
put
in interface RxInvoker<T>
R
- response entity type.entity
- request entity, including it's full 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.clazz
- Java type the response entity will be converted to.public <R> T put(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<R> type)
RxInvoker
put
in interface RxInvoker<T>
R
- generic response entity type.entity
- request entity, including it's full 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.type
- representation of a generic Java type the response entity will be converted to.public T post(javax.ws.rs.client.Entity<?> entity)
RxInvoker
post
in interface RxInvoker<T>
entity
- request entity, including it's full 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.public <R> T post(javax.ws.rs.client.Entity<?> entity, Class<R> clazz)
RxInvoker
post
in interface RxInvoker<T>
R
- response entity type.entity
- request entity, including it's full 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.clazz
- Java type the response entity will be converted to.public <R> T post(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<R> type)
RxInvoker
post
in interface RxInvoker<T>
R
- generic response entity type.entity
- request entity, including it's full 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.type
- representation of a generic Java type the response entity will be converted to.public T delete()
RxInvoker
public <R> T delete(Class<R> responseType)
RxInvoker
public <R> T delete(javax.ws.rs.core.GenericType<R> responseType)
RxInvoker
public T head()
RxInvoker
public T options()
RxInvoker
public <R> T options(Class<R> responseType)
RxInvoker
public <R> T options(javax.ws.rs.core.GenericType<R> responseType)
RxInvoker
public T trace()
RxInvoker
public <R> T trace(Class<R> responseType)
RxInvoker
public <R> T trace(javax.ws.rs.core.GenericType<R> responseType)
RxInvoker
public T method(String name)
RxInvoker
public <R> T method(String name, Class<R> responseType)
RxInvoker
public <R> T method(String name, javax.ws.rs.core.GenericType<R> responseType)
RxInvoker
public T method(String name, javax.ws.rs.client.Entity<?> entity)
RxInvoker
method
in interface RxInvoker<T>
name
- method name.entity
- request entity, including it's full 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.Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.