public interface AsyncInvocationInterceptor
newInterceptor
method of all
registered AsyncInvocationInterceptorFactory
providers.
The MP Rest Client implementation runtime will invoke the pre
method on the main thread prior to returning execution back to the calling
method of the client interface. The runtime will invoke the
prepareContext
method on the secondary thread before the client
request is sent. The prepareContext
method should always be
invoked before the applyContext
method is invoked, but due to
the nature of multithreading, it is possible that applyContext
method may be invoked before the prepareContext
method has
completed. Care should be taken when implementing this interface to avoid
race conditions and deadlocks.
Note that the order in which instances of the
AsyncInvocationInterceptor
are invoked are determined by the
priority of the AsyncInvocationInterceptorFactory
provider.Modifier and Type | Method and Description |
---|---|
void |
applyContext()
This method will be invoked by the MP Rest Client runtime on the "async"
thread (i.e.
|
void |
prepareContext()
This method will be invoked by the MP Rest Client runtime on the "main"
thread (i.e.
|
void prepareContext()
void applyContext()