lilypad.client.connect.api.result
Interface FutureResult<T extends Result>


public interface FutureResult<T extends Result>


Method Summary
 T await()
          Awaits a result with no timeout.
 T await(long timeout)
          Awaits a result with a timeout in milliseconds.
 T awaitUninterruptibly()
          Awaits a result uninterruptibly with no timeout.
 T awaitUninterruptibly(long timeout)
          Awaits a result uninterruptibly with a timeout in milliseconds.
 void registerListener(FutureResultListener<T> futureResultListener)
          Registers a listener to receive a callback when the future has been completed.
 void unregisterListener(FutureResultListener<T> futureResultListener)
          Unregisters a listener to exclude from receiving a callback when the future has been completed.
 

Method Detail

registerListener

void registerListener(FutureResultListener<T> futureResultListener)
Registers a listener to receive a callback when the future has been completed.

Parameters:
futureResultListener -

unregisterListener

void unregisterListener(FutureResultListener<T> futureResultListener)
Unregisters a listener to exclude from receiving a callback when the future has been completed.

Parameters:
futureResultListener -

await

T await()
                       throws java.lang.InterruptedException
Awaits a result with no timeout.

Returns:
the result, null if cancelled
Throws:
java.lang.InterruptedException

await

T await(long timeout)
                       throws java.lang.InterruptedException
Awaits a result with a timeout in milliseconds.

Returns:
the result, null if cancelled
Throws:
java.lang.InterruptedException

awaitUninterruptibly

T awaitUninterruptibly()
Awaits a result uninterruptibly with no timeout.

Returns:
the result, null if cancelled

awaitUninterruptibly

T awaitUninterruptibly(long timeout)
Awaits a result uninterruptibly with a timeout in milliseconds.

Returns:
the result, null if cancelled