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.
|
Listeners<T> |
whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an invocation is completed. |
Listeners<T> |
whenComplete(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when an invocation is completed. |
Listeners<T> |
whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed invocation attempt. |
Listeners<T> |
whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after a failed invocation attempt. |
Listeners<T> |
whenFailure(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called after an invocation attempt fails. |
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. |
Listeners<T> |
whenRetry(ContextualResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called when the retry policy is exceeded and the result is a failure. |
Listeners<T> |
whenRetry(ResultListener<? super T,? extends Throwable> listener)
Registers the
listener to be called before a retry is attempted. |
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 Listeners<T> whenComplete(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called when an invocation is completed.public Listeners<T> whenComplete(ResultListener<? super T,? extends Throwable> listener)
listener to be called when an invocation is completed.public Listeners<T> whenFailedAttempt(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called after a failed invocation attempt.public Listeners<T> whenFailedAttempt(ResultListener<? super T,? extends Throwable> listener)
listener to be called after a failed invocation attempt.public Listeners<T> whenFailure(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called after an invocation attempt fails.public Listeners<T> whenFailure(ResultListener<? super T,? extends Throwable> listener)
listener to be called when the retry policy is exceeded and the result is a failure.public Listeners<T> whenRetry(ContextualResultListener<? super T,? extends Throwable> listener)
listener to be called when the retry policy is exceeded and the result is a failure.public Listeners<T> whenRetry(ResultListener<? super T,? extends Throwable> listener)
listener to be called before a retry is attempted.public Listeners<T> 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.