|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.wasync.impl.DefaultFuture
public class DefaultFuture
The default Future used by the library, based on the CountDownLatch
| Constructor Summary | |
|---|---|
DefaultFuture(DefaultSocket socket)
|
|
| Method Summary | |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
void |
close()
Close the underlying Socket |
void |
done()
Mark this instance as done. |
Future |
finishOrThrowException()
Mark the future done. |
Future |
fire(java.lang.Object data)
Send data to the remote Server. |
Socket |
get()
|
Socket |
get(long timeout,
java.util.concurrent.TimeUnit unit)
|
Future |
ioException(java.io.IOException t)
If an exception occurs, the Transport will set it using this method. |
boolean |
isCancelled()
|
boolean |
isDone()
|
protected void |
reset()
|
protected Socket |
socket()
|
long |
time()
|
DefaultFuture |
timeoutException(java.util.concurrent.TimeoutException te)
|
java.util.concurrent.TimeUnit |
timeUnit()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFuture(DefaultSocket socket)
| Method Detail |
|---|
public long time()
public java.util.concurrent.TimeUnit timeUnit()
public DefaultFuture timeoutException(java.util.concurrent.TimeoutException te)
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Future<Socket>public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<Socket>public boolean isDone()
isDone in interface java.util.concurrent.Future<Socket>public void done()
Future
public void close()
FutureSocket
public Future finishOrThrowException()
throws java.io.IOException
Future
java.io.IOExceptionpublic Future ioException(java.io.IOException t)
Transport will set it using this method. An application can also
use that method to interrupt a blocking Socket.open(Request) operation. This operation
must unlock the current blocked thread.
t - a IOException
Futureprotected void reset()
public Socket get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<Socket>java.lang.InterruptedException
java.util.concurrent.ExecutionException
public Socket get(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.util.concurrent.TimeoutException
get in interface java.util.concurrent.Future<Socket>java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutExceptionprotected Socket socket()
public Future fire(java.lang.Object data)
throws java.io.IOException
data - the message to fire
Future
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||