org.msgpack.rpc
Class Future<V>
java.lang.Object
org.msgpack.rpc.Future<V>
- All Implemented Interfaces:
- java.util.concurrent.Future<V>
public class Future<V>
- extends java.lang.Object
- implements java.util.concurrent.Future<V>
Constructor Summary |
Future(Future<org.msgpack.MessagePackObject> future,
java.lang.Class<V> resultClass)
|
Future(Future<org.msgpack.MessagePackObject> future,
org.msgpack.Template resultTemplate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Future
public Future(Future<org.msgpack.MessagePackObject> future,
java.lang.Class<V> resultClass)
Future
public Future(Future<org.msgpack.MessagePackObject> future,
org.msgpack.Template resultTemplate)
attachCallback
public void attachCallback(java.lang.Runnable callback)
get
public V get()
throws java.lang.InterruptedException
- Specified by:
get
in interface java.util.concurrent.Future<V>
- Throws:
java.lang.InterruptedException
get
public V get(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException
- Specified by:
get
in interface java.util.concurrent.Future<V>
- Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
join
public void join()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
join
public void join(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException
- Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
isDone
public boolean isDone()
- Specified by:
isDone
in interface java.util.concurrent.Future<V>
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interface java.util.concurrent.Future<V>
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface java.util.concurrent.Future<V>
getResult
public V getResult()
getError
public org.msgpack.MessagePackObject getError()
Copyright © 2010. All Rights Reserved.