net.tomp2p.futures
Interface BaseFutureListener<F extends BaseFuture>

Type Parameters:
F -
All Known Implementing Classes:
BaseFutureAdapter

public interface BaseFutureListener<F extends BaseFuture>

Something interested in being notified when the result of an BaseFuture becomes available.

Author:
Thomas Bocek

Method Summary
 void exceptionCaught(Throwable t)
          If the operation complete is called and the methed throws an exception
 void operationComplete(F future)
          Invoked when the operation associated with the BaseFuture has been completed.
 

Method Detail

operationComplete

void operationComplete(F future)
                       throws Exception
Invoked when the operation associated with the BaseFuture has been completed. If a operation already completed, then this method is not invoked.

Parameters:
future - The future operation
Throws:
Exception

exceptionCaught

void exceptionCaught(Throwable t)
                     throws Exception
If the operation complete is called and the methed throws an exception

Parameters:
t - The exception thrown in #operationComplete(BaseFuture).
Throws:
Exception - If an execption is thrown, it is printed in the log and and System.err


Copyright © 2013. All Rights Reserved.