JBoss Threads 2.0.0.GA

org.jboss.threads
Class AsyncFuture.AbstractListener<T,A>

java.lang.Object
  extended by org.jboss.threads.AsyncFuture.AbstractListener<T,A>
Type Parameters:
T - the future type
A - 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.


Constructor Summary
AsyncFuture.AbstractListener()
           
 
Method Summary
 void handleCancelled(AsyncFuture<? extends T> future, A attachment)
          Handle a cancellation result.
 void handleComplete(AsyncFuture<? extends T> future, A attachment)
          Handle a successful computation result.
 void handleFailed(AsyncFuture<? extends T> future, Throwable cause, A attachment)
          Handle a failure result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncFuture.AbstractListener

public AsyncFuture.AbstractListener()
Method Detail

handleComplete

public void handleComplete(AsyncFuture<? extends T> future,
                           A attachment)
Handle a successful computation result.

Specified by:
handleComplete in interface AsyncFuture.Listener<T,A>
Parameters:
future - the future
attachment - the attachment

handleFailed

public void handleFailed(AsyncFuture<? extends T> future,
                         Throwable cause,
                         A attachment)
Handle a failure result.

Specified by:
handleFailed in interface AsyncFuture.Listener<T,A>
Parameters:
future - the future
cause - the reason for the failure
attachment - the attachment

handleCancelled

public void handleCancelled(AsyncFuture<? extends T> future,
                            A attachment)
Handle a cancellation result.

Specified by:
handleCancelled in interface AsyncFuture.Listener<T,A>
Parameters:
future - the future
attachment - the attachment

JBoss Threads 2.0.0.GA

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.