AsynchronousSocketChannel. In some cases exceptions may
be swallowed to save them being swallowed by the calling code.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Future | |
| private final AsynchronousSocketChannel |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public SocketAddress | |
| public Future | |
| public Future | |
| public <B, A extends B> void | read(ByteBuffer dst, A attachment, CompletionHandler<Integer, B> handler)
Implements org.
|
| public Future | |
| public <B, A extends B> void | write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, B> handler)
Implements org.
|
| NOOP_FUTURE | back to summary |
|---|---|
| private static final Future<Void> NOOP_FUTURE | |
| socketChannel | back to summary |
|---|---|
| private final AsynchronousSocketChannel socketChannel | |
| AsyncChannelWrapperNonSecure | back to summary |
|---|---|
| public AsyncChannelWrapperNonSecure(AsynchronousSocketChannel socketChannel) | |
| close | back to summary |
|---|---|
| public void close() Implements org.
| |
| getLocalAddress | back to summary |
|---|---|
| public SocketAddress getLocalAddress() throws IOException Implements org.
| |
| handshake | back to summary |
|---|---|
| public Future Implements org.
| |
| read | back to summary |
|---|---|
| public Future Implements org.
| |
| read | back to summary |
|---|---|
| public <B, A extends B> void read(ByteBuffer dst, A attachment, CompletionHandler<Integer, B> handler) Implements org.
| |
| write | back to summary |
|---|---|
| public Future Implements org.
| |
| write | back to summary |
|---|---|
| public <B, A extends B> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, B> handler) Implements org.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | cancel(boolean
true if the thread
executing this task should be interrupted (if the thread is
known to the implementation); otherwise, in-progress tasks are
allowed to completeImplements java. Attempts to cancel execution of this task. |
| public Void | get()
Implements java. Waits if necessary for the computation to complete, and then retrieves its result. |
| public Void | get(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
| public boolean | isCancelled()
Implements java. Returns |
| public boolean |
| NoOpFuture | back to summary |
|---|---|
| private NoOpFuture() | |
| cancel | back to summary |
|---|---|
| public boolean cancel(boolean mayInterruptIfRunning) Implements java. Doc from java. Attempts to cancel execution of this task. This method has no
effect if the task is already completed or cancelled, or could
not be cancelled for some other reason. Otherwise, if this
task has not started when The return value from this method does not necessarily
indicate whether the task is now cancelled; use
| |
| get | back to summary |
|---|---|
| public Void get() throws InterruptedException, ExecutionException Implements java. Doc from java. Waits if necessary for the computation to complete, and then retrieves its result.
| |
| get | back to summary |
|---|---|
| public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Implements java. Doc from java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements java. Doc from java. Returns
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements java. Doc from java. Returns
| |