| Constructor and Description |
|---|
DefaultFuture(DefaultSocket socket) |
| Modifier and Type | Method and Description |
|---|---|
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() |
public DefaultFuture(DefaultSocket socket)
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()
Futurepublic Future finishOrThrowException() throws java.io.IOException
Futurejava.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 IOExceptionFutureprotected void reset()
public Socket get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<Socket>java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic 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.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionprotected Socket socket()
Copyright © 2019. All Rights Reserved.