|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.process.internal.RequestInvoker
public class RequestInvoker
Request invoker is the main request to response processing entry point. It invokes
requests and returns a listenable response future.
request processor
to run each invoked request through the (injected) request processing stages (acceptors
until a terminal request processing stage referencing an
Inflector<Request, Response> is reached.
The inflector referenced by the terminal request processing stage is then wrapped
into a suspendable inflector which is subsequently
invoked. Once a response from the inflector is available, it is processed by
a response processor before it is made available in the
response future returned by the request invoker. If a response callback
is supplied, it is invoked at the end of the response processing chain.
Request and response processing tasks are handled by a pair of dedicated customizable
executors, one for request and the other one for response
processing. By default, the request processing is executed on the caller thread.
If the request processing is not suspended
in the inflector, the response processing is by default executed synchronously
on the caller thread too. In case the request processing is suspended, the response
processing is resumed in the thread executing the code that resumed the response
processing.
| Nested Class Summary | |
|---|---|
static class |
RequestInvoker.Builder
Injection-enabled RequestInvoker instance builder. |
| Method Summary | |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Response> |
apply(Request request)
Transform request data of a given type into a response result of the different type. |
com.google.common.util.concurrent.ListenableFuture<Response> |
apply(Request request,
InvocationCallback callback)
Transform request data of a given type into a response result of the different type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public com.google.common.util.concurrent.ListenableFuture<Response> apply(Request request)
request - request data to be transformed into a response result.
public com.google.common.util.concurrent.ListenableFuture<Response> apply(Request request,
InvocationCallback callback)
result callback
is invoked. The result callback can be invoked on a different thread but
still in the same request invocation context.
request - request data to be transformed into a response result.callback - result callback called when the request transformation is
done. Must not be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||