I
- Input type used by ExecutionContext
passed to
listener where it can call ExecutionContext.getRequest()
to examine the
request object of the executionO
- Output type from the load balancer execution, used by onExecutionSuccess(ExecutionContext, Object, com.netflix.loadbalancer.reactive.ExecutionInfo)
APIpublic interface ExecutionListener<I,O>
Modifier and Type | Interface and Description |
---|---|
static class |
ExecutionListener.AbortExecutionException
An exception to indicate that the listener wants to abort execution
|
Modifier and Type | Method and Description |
---|---|
void |
onExceptionWithServer(ExecutionContext<I> context,
java.lang.Throwable exception,
ExecutionInfo info)
Called when an exception is received from executing the request on a server.
|
void |
onExecutionFailed(ExecutionContext<I> context,
java.lang.Throwable finalException,
ExecutionInfo info)
Called when the request is considered failed after all retries.
|
void |
onExecutionStart(ExecutionContext<I> context)
Called when execution is about to start.
|
void |
onExecutionSuccess(ExecutionContext<I> context,
O response,
ExecutionInfo info)
Called when the request is executed successfully on the server
|
void |
onStartWithServer(ExecutionContext<I> context,
ExecutionInfo info)
Called when a server is chosen and the request is going to be executed on the server.
|
void onExecutionStart(ExecutionContext<I> context) throws ExecutionListener.AbortExecutionException
ExecutionListener.AbortExecutionException
- if the listener would
like to abort the executionvoid onStartWithServer(ExecutionContext<I> context, ExecutionInfo info) throws ExecutionListener.AbortExecutionException
ExecutionListener.AbortExecutionException
- if the listener would
like to abort the executionvoid onExceptionWithServer(ExecutionContext<I> context, java.lang.Throwable exception, ExecutionInfo info)
exception
- Exception receivedvoid onExecutionSuccess(ExecutionContext<I> context, O response, ExecutionInfo info)
response
- Object received from the executionvoid onExecutionFailed(ExecutionContext<I> context, java.lang.Throwable finalException, ExecutionInfo info)
finalException
- Final exception received. This may be a wrapped exception indicating that all
retries have been exhausted.