Package org.glassfish.jersey.client
Class AbstractRxInvoker<T>
- java.lang.Object
-
- org.glassfish.jersey.client.AbstractRxInvoker<T>
-
- Type Parameters:
T
- the asynchronous/event-based completion aware type. The given type should be parametrized with the actual response type.
- All Implemented Interfaces:
RxInvoker<T>
public abstract class AbstractRxInvoker<T> extends Object implements RxInvoker<T>
Default implementation ofreactive invoker
. Extensions of this class are supposed to implementmethod(String, Entity, Class)
andmethod(String, Entity, GenericType)
methods to which implementations of the rest of the methods from the contract delegate to.- Since:
- 2.26
- Author:
- Michal Gajdos
-
-
Constructor Summary
Constructors Constructor Description AbstractRxInvoker(SyncInvoker syncInvoker, ExecutorService executor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
delete()
<R> T
delete(GenericType<R> responseType)
<R> T
delete(Class<R> responseType)
T
get()
<R> T
get(GenericType<R> responseType)
<R> T
get(Class<R> responseType)
protected ExecutorService
getExecutorService()
Return executorService service this reactive invoker was initialized with.protected SyncInvoker
getSyncInvoker()
Return invocation builder this reactive invoker was initialized with.T
head()
T
method(String name)
T
method(String name, Entity<?> entity)
abstract <R> T
method(String name, Entity<?> entity, GenericType<R> responseType)
abstract <R> T
method(String name, Entity<?> entity, Class<R> responseType)
<R> T
method(String name, GenericType<R> responseType)
<R> T
method(String name, Class<R> responseType)
T
options()
<R> T
options(GenericType<R> responseType)
<R> T
options(Class<R> responseType)
T
post(Entity<?> entity)
<R> T
post(Entity<?> entity, GenericType<R> type)
<R> T
post(Entity<?> entity, Class<R> clazz)
T
put(Entity<?> entity)
<R> T
put(Entity<?> entity, GenericType<R> type)
<R> T
put(Entity<?> entity, Class<R> clazz)
T
trace()
<R> T
trace(GenericType<R> responseType)
<R> T
trace(Class<R> responseType)
-
-
-
Constructor Detail
-
AbstractRxInvoker
public AbstractRxInvoker(SyncInvoker syncInvoker, ExecutorService executor)
-
-
Method Detail
-
getSyncInvoker
protected SyncInvoker getSyncInvoker()
Return invocation builder this reactive invoker was initialized with.- Returns:
- non-null invocation builder.
-
getExecutorService
protected ExecutorService getExecutorService()
Return executorService service this reactive invoker was initialized with.- Returns:
- executorService service instance or
null
.
-
method
public <R> T method(String name, GenericType<R> responseType)
-
get
public T get()
-
get
public <R> T get(Class<R> responseType)
-
get
public <R> T get(GenericType<R> responseType)
-
put
public T put(Entity<?> entity)
-
put
public <R> T put(Entity<?> entity, GenericType<R> type)
-
post
public T post(Entity<?> entity)
-
post
public <R> T post(Entity<?> entity, GenericType<R> type)
-
delete
public T delete()
-
delete
public <R> T delete(Class<R> responseType)
-
delete
public <R> T delete(GenericType<R> responseType)
-
head
public T head()
-
options
public T options()
-
options
public <R> T options(Class<R> responseType)
-
options
public <R> T options(GenericType<R> responseType)
-
trace
public T trace()
-
trace
public <R> T trace(Class<R> responseType)
-
trace
public <R> T trace(GenericType<R> responseType)
-
method
public abstract <R> T method(String name, Entity<?> entity, GenericType<R> responseType)
-
-