| 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(Object data)
Send data to the remote Server.
|
Socket |
get() |
Socket |
get(long timeout,
TimeUnit unit) |
Future |
ioException(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(TimeoutException te) |
TimeUnit |
timeUnit() |
public DefaultFuture(DefaultSocket socket)
public long time()
public TimeUnit timeUnit()
public DefaultFuture timeoutException(TimeoutException te)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<Socket>public void done()
Futurepublic Future finishOrThrowException() throws IOException
FutureIOExceptionpublic Future ioException(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 InterruptedException, ExecutionException
get in interface Future<Socket>InterruptedExceptionExecutionExceptionpublic Socket get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Socket>InterruptedExceptionExecutionExceptionTimeoutExceptionprotected Socket socket()
public Future fire(Object data) throws IOException
data - the message to fireFutureIOExceptionCopyright © 2016. All Rights Reserved.