org.fusesource.stomp.client
Class Promise<T>

java.lang.Object
  extended by org.fusesource.stomp.client.Callback<T>
      extended by org.fusesource.stomp.client.Promise<T>
All Implemented Interfaces:
Future<T>

public class Promise<T>
extends Callback<T>
implements Future<T>

Author:
Hiram Chirino

Constructor Summary
Promise()
           
 
Method Summary
 T await()
           
 T await(long amount, java.util.concurrent.TimeUnit unit)
           
 void onFailure(java.lang.Throwable value)
           
 void onSuccess(T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Promise

public Promise()
Method Detail

onFailure

public void onFailure(java.lang.Throwable value)
Overrides:
onFailure in class Callback<T>

onSuccess

public void onSuccess(T value)
Overrides:
onSuccess in class Callback<T>

await

public T await(long amount,
               java.util.concurrent.TimeUnit unit)
        throws java.lang.Exception
Specified by:
await in interface Future<T>
Throws:
java.lang.Exception

await

public T await()
        throws java.lang.Exception
Specified by:
await in interface Future<T>
Throws:
java.lang.Exception


Copyright © 2010-2012 FuseSource, Corp.. All Rights Reserved.