T - result typepublic class Listeners<T> extends Object
| Constructor and Description |
|---|
Listeners() |
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete(T result,
Throwable failure)
Called when an execution is completed.
|
void |
onComplete(T result,
Throwable failure,
ExecutionStats stats)
Called when an execution is completed.
|
void |
onFailedAttempt(T result,
Throwable failure)
Called after a failed attempt.
|
void |
onFailedAttempt(T result,
Throwable failure,
ExecutionStats stats)
Called after a failed attempt.
|
void |
onFailure(T result,
Throwable failure)
Called after the retry policy is exceeded and the result is a failure.
|
void |
onFailure(T result,
Throwable failure,
ExecutionStats stats)
Called after the retry policy is exceeded and the result is a failure.
|
void |
onRetry(T result,
Throwable failure)
Called before a retry is attempted.
|
void |
onRetry(T result,
Throwable failure,
ExecutionStats stats)
Called before a retry is attempted.
|
void |
onSuccess(T result)
Called after a successful execution.
|
void |
onSuccess(T result,
ExecutionStats stats)
Called after a successful execution.
|
<L extends Listeners<T>> |
whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an execution is completed. |
<L extends Listeners<T>> |
whenComplete(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an execution is completed. |
<L extends Listeners<T>> |
whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed execution attempt. |
<L extends Listeners<T>> |
whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed execution attempt. |
<L extends Listeners<T>> |
whenFailure(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when the retry policy is exceeded and the result is a failure. |
<L extends Listeners<T>> |
whenFailure(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when the retry policy is exceeded and the result is a failure. |
<L extends Listeners<T>> |
whenRetry(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called before a retry is attempted. |
<L extends Listeners<T>> |
whenRetry(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called before a retry is attempted. |
<L extends Listeners<T>> |
whenSuccess(ContextualSuccessListener<? super T> listener)
Registers the
listener to be called after a successful execution. |
Listeners<T> |
whenSuccess(SuccessListener<? super T> listener)
Registers the
listener to be called after a successful execution. |
public void onComplete(T result, Throwable failure)
public void onComplete(T result, Throwable failure, ExecutionStats stats)
public void onFailedAttempt(T result, Throwable failure)
public void onFailedAttempt(T result, Throwable failure, ExecutionStats stats)
public void onFailure(T result, Throwable failure)
public void onFailure(T result, Throwable failure, ExecutionStats stats)
public void onRetry(T result, Throwable failure, ExecutionStats stats)
public void onSuccess(T result)
public void onSuccess(T result, ExecutionStats stats)
public <L extends Listeners<T>> L whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called when an execution is completed.public <L extends Listeners<T>> L whenComplete(ResultListener<? super T,? extends Throwable> listener)
listener to be called when an execution is completed.public <L extends Listeners<T>> L whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called after a failed execution attempt.public <L extends Listeners<T>> L whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
listener to be called after a failed execution attempt.public <L extends Listeners<T>> L whenFailure(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called when the retry policy is exceeded and the result is a failure.public <L extends Listeners<T>> L whenFailure(ResultListener<? super T,? extends Throwable> listener)
listener to be called when the retry policy is exceeded and the result is a failure.public <L extends Listeners<T>> L whenRetry(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called before a retry is attempted.public <L extends Listeners<T>> L whenRetry(ResultListener<? super T,? extends Throwable> listener)
listener to be called before a retry is attempted.public <L extends Listeners<T>> L whenSuccess(ContextualSuccessListener<? super T> listener)
listener to be called after a successful execution.public Listeners<T> whenSuccess(SuccessListener<? super T> listener)
listener to be called after a successful execution.Copyright © 2016. All Rights Reserved.