Class AsyncFuture.AbstractListener<T,A>
java.lang.Object
org.jboss.threads.AsyncFuture.AbstractListener<T,A>
- Type Parameters:
T- the future typeA- the attachment type
- All Implemented Interfaces:
EventListener,AsyncFuture.Listener<T,A>
- Enclosing interface:
AsyncFuture<T>
public abstract static class AsyncFuture.AbstractListener<T,A>
extends Object
implements AsyncFuture.Listener<T,A>
An abstract base class for an implementation of the
Listener interface. The implementation
methods do nothing unless overridden.- Author:
- David M. Lloyd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleCancelled(AsyncFuture<? extends T> future, A attachment) Handle a cancellation result.voidhandleComplete(AsyncFuture<? extends T> future, A attachment) Handle a successful computation result.voidhandleFailed(AsyncFuture<? extends T> future, Throwable cause, A attachment) Handle a failure result.
-
Constructor Details
-
AbstractListener
public AbstractListener()
-
-
Method Details
-
handleComplete
Handle a successful computation result.- Specified by:
handleCompletein interfaceAsyncFuture.Listener<T,A> - Parameters:
future- the futureattachment- the attachment
-
handleFailed
Handle a failure result.- Specified by:
handleFailedin interfaceAsyncFuture.Listener<T,A> - Parameters:
future- the futurecause- the reason for the failureattachment- the attachment
-
handleCancelled
Handle a cancellation result.- Specified by:
handleCancelledin interfaceAsyncFuture.Listener<T,A> - Parameters:
future- the futureattachment- the attachment
-