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 invocation is completed.
|
void |
onComplete(T result,
Throwable failure,
InvocationStats stats)
Called when an invocation is completed.
|
void |
onFailedAttempt(T result,
Throwable failure)
Called after a failed attempt.
|
void |
onFailedAttempt(T result,
Throwable failure,
InvocationStats 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,
InvocationStats 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,
InvocationStats stats)
Called before a retry is attempted.
|
void |
onSuccess(T result)
Called after a successful invocation.
|
void |
onSuccess(T result,
InvocationStats stats)
Called after a successful invocation.
|
<L extends Listeners<T>> |
whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an invocation is completed. |
<L extends Listeners<T>> |
whenComplete(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an invocation is completed. |
<L extends Listeners<T>> |
whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed invocation attempt. |
<L extends Listeners<T>> |
whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed invocation 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 invocation. |
Listeners<T> |
whenSuccess(SuccessListener<? super T> listener)
Registers the
listener to be called after a successful invocation. |
public void onComplete(T result, Throwable failure)
public void onComplete(T result, Throwable failure, InvocationStats stats)
public void onFailedAttempt(T result, Throwable failure)
public void onFailedAttempt(T result, Throwable failure, InvocationStats stats)
public void onFailure(T result, Throwable failure)
public void onFailure(T result, Throwable failure, InvocationStats stats)
public void onRetry(T result, Throwable failure, InvocationStats stats)
public void onSuccess(T result)
public void onSuccess(T result, InvocationStats stats)
public <L extends Listeners<T>> L whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called when an invocation is completed.public <L extends Listeners<T>> L whenComplete(ResultListener<? super T,? extends Throwable> listener)
listener to be called when an invocation is completed.public <L extends Listeners<T>> L whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called after a failed invocation attempt.public <L extends Listeners<T>> L whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
listener to be called after a failed invocation 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 invocation.public Listeners<T> whenSuccess(SuccessListener<? super T> listener)
listener to be called after a successful invocation.Copyright © 2016. All Rights Reserved.