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

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

public class Promise<T>
extends java.lang.Object
implements Callback<T>, 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)
           
 void then(Callback<T> callback)
           
 
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)
Specified by:
onFailure in interface Callback<T>

onSuccess

public void onSuccess(T value)
Specified by:
onSuccess in interface Callback<T>

then

public void then(Callback<T> callback)
Specified by:
then in interface Future<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-2019 FuseSource, Corp.. All Rights Reserved.