| Modifier and Type | Field and Description |
|---|---|
| private ApplicationBufferHandler | |
| protected final SocketBufferHandler | |
| pack-priv static final Nio2Channel | |
| private static final Future | |
| private static final Future | |
| protected static final ByteBuffer | |
| protected AsynchronousSocketChannel | |
| protected SocketWrapperBase |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Future | |
| public void | |
| protected ApplicationBufferHandler | |
| public SocketBufferHandler | |
| public AsynchronousSocketChannel | |
| pack-priv SocketWrapperBase | |
| public int | Returns: Always returns zeroPerforms SSL handshake hence is a no-op for the non-secure implementation. |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if, and only if, this channel is openImplements java. Tells whether or not this channel is open. |
| public Future | read(ByteBuffer
The buffer into which bytes are to be transferred dst)Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| public <A> void | read(ByteBuffer
The buffer into which bytes are to be transferred dst, A The object to attach to the I/O operation; can be attachment, CompletionHandler<Integer, ? super A> nullThe completion handler handler)Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| public <A> void | read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer, ? super A> handler)
|
| public <A> void | read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, ? super A> handler)
|
| public void | reset(AsynchronousSocketChannel
The new async channel to associate with this NIO2 channel channel, SocketWrapperBase<Nio2Channel> The new socket to associate with this NIO2 channel socketWrapper)Reset the channel. |
| public void | |
| public String | |
| public Future | write(ByteBuffer
The buffer from which bytes are to be retrieved src)Implements java. Writes a sequence of bytes to this channel from the given buffer. |
| public <A> void | write(ByteBuffer
The buffer from which bytes are to be retrieved src, A The object to attach to the I/O operation; can be attachment, CompletionHandler<Integer, ? super A> nullThe completion handler object handler)Implements java. Writes a sequence of bytes to this channel from the given buffer. |
| public <A> void | write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer, ? super A> handler)
|
| public <A> void | write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, ? super A> handler)
|
| appReadBufHandler | back to summary |
|---|---|
| private ApplicationBufferHandler appReadBufHandler | |
| bufHandler | back to summary |
|---|---|
| protected final SocketBufferHandler bufHandler | |
| CLOSED_NIO2_CHANNEL | back to summary |
|---|---|
| pack-priv static final Nio2Channel CLOSED_NIO2_CHANNEL | |
| DONE | back to summary |
|---|---|
| private static final Future<Boolean> DONE | |
| DONE_INT | back to summary |
|---|---|
| private static final Future<Integer> DONE_INT | |
| emptyBuf | back to summary |
|---|---|
| protected static final ByteBuffer emptyBuf | |
| sc | back to summary |
|---|---|
| protected AsynchronousSocketChannel sc | |
| socketWrapper | back to summary |
|---|---|
| protected SocketWrapperBase<Nio2Channel> socketWrapper | |
| Nio2Channel | back to summary |
|---|---|
| public Nio2Channel(SocketBufferHandler bufHandler) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Closes this channel.
| |
| close | back to summary |
|---|---|
| public void close(boolean force) throws IOException Close the connection.
| |
| flush | back to summary |
|---|---|
| public Future | |
| free | back to summary |
|---|---|
| public void free() Free the channel memory | |
| getAppReadBufHandler | back to summary |
|---|---|
| protected ApplicationBufferHandler getAppReadBufHandler() | |
| getBufHandler | back to summary |
|---|---|
| public SocketBufferHandler getBufHandler() | |
| getIOChannel | back to summary |
|---|---|
| public AsynchronousSocketChannel getIOChannel() | |
| getSocketWrapper | back to summary |
|---|---|
| pack-priv SocketWrapperBase | |
| handshake | back to summary |
|---|---|
| public int handshake() throws IOException Performs SSL handshake hence is a no-op for the non-secure implementation.
| |
| isClosing | back to summary |
|---|---|
| public boolean isClosing() | |
| isHandshakeComplete | back to summary |
|---|---|
| public boolean isHandshakeComplete() | |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements java. Tells whether or not this channel is open.
| |
| read | back to summary |
|---|---|
| public Future Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffer. This method initiates an asynchronous read operation to read a
sequence of bytes from this channel into the given buffer. The method
behaves in exactly the same manner as the
| |
| read | back to summary |
|---|---|
| public <A> void read(ByteBuffer dst, A attachment, CompletionHandler<Integer, ? super A> handler) Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffer. This method initiates an asynchronous read operation to read a
sequence of bytes from this channel into the given buffer. The The read operation may read up to r bytes from the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is read, where
Buffers are not safe for use by multiple concurrent threads so care should be taken to not access the buffer until the operation has completed. This method may be invoked at any time. Some channel types may not
allow more than one read to be outstanding at any given time. If a thread
initiates a read operation before a previous read operation has
completed then a
| |
| read | back to summary |
|---|---|
| public <A> void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer, ? super A> handler) | |
| read | back to summary |
|---|---|
| public <A> void read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, ? super A> handler) | |
| reset | back to summary |
|---|---|
| public void reset(AsynchronousSocketChannel channel, SocketWrapperBase<Nio2Channel> socketWrapper) throws IOException Reset the channel.
| |
| setAppReadBufHandler | back to summary |
|---|---|
| public void setAppReadBufHandler(ApplicationBufferHandler handler) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| write | back to summary |
|---|---|
| public Future Implements java. Doc from java. Writes a sequence of bytes to this channel from the given buffer. This method initiates an asynchronous write operation to write a
sequence of bytes to this channel from the given buffer. The method
behaves in exactly the same manner as the
| |
| write | back to summary |
|---|---|
| public <A> void write(ByteBuffer src, A attachment, CompletionHandler<Integer, ? super A> handler) Implements java. Doc from java. Writes a sequence of bytes to this channel from the given buffer. This method initiates an asynchronous write operation to write a
sequence of bytes to this channel from the given buffer. The The write operation may write up to r bytes to the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is written, where
Buffers are not safe for use by multiple concurrent threads so care should be taken to not access the buffer until the operation has completed. This method may be invoked at any time. Some channel types may not
allow more than one write to be outstanding at any given time. If a thread
initiates a write operation before a previous write operation has
completed then a
| |
| write | back to summary |
|---|---|
| public <A> void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer, ? super A> handler) | |
| write | back to summary |
|---|---|
| public <A> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, ? super A> handler) | |