@API(status=MAINTAINED)
public interface Plugin
executions of requests in order to inject specific behaviour.
The chronological order of phases is
request executions allows plugins to inject behavior before, after and even
during the execution on a request.OriginalStackTracePlugin,
Plugin Phases| Modifier and Type | Method and Description |
|---|---|
default RequestExecution |
aroundAsync(RequestExecution execution)
The given execution will be executed in a different thread and therefore be properly asynchronous.
|
default RequestExecution |
aroundDispatch(RequestExecution execution)
The given execution will have the response already being dispatched onto the given
Route. |
default RequestExecution |
aroundNetwork(RequestExecution execution)
The given execution will include the pure network communication.
|
default RequestExecution |
aroundSerialization(RequestExecution execution)
The given execution will have the request body already serialized into bytes.
|
static Plugin |
composite(List<Plugin> plugins) |
static Plugin |
composite(Plugin... plugins) |
default RequestExecution aroundAsync(RequestExecution execution)
execution - the execution that includes the thread switch as well as the dispatch, serialization and network phasesdefault RequestExecution aroundDispatch(RequestExecution execution)
Route. Any
exceptions that were produced from the response will be observable in this stage.execution - the execution that includes the dispatch, serialization and network phasedefault RequestExecution aroundSerialization(RequestExecution execution)
execution - the execution that includes serialization and network phasedefault RequestExecution aroundNetwork(RequestExecution execution)
execution - the execution that includes the network communicationCopyright © 2015–2020 Zalando SE. All rights reserved.