| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| protected boolean | |
| protected boolean | |
| private static final int | |
| private final NioEndpoint | |
| protected boolean | |
| protected SSLEngineResult. | |
| private static final Log | |
| protected ByteBuffer | |
| protected ByteBuffer | |
| private static final StringManager | |
| protected boolean | |
| protected SSLEngine |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Implements java. Sends an SSL close message, will not physically close the connection here. |
| public void | close(boolean
Should the underlying socket be forcibly closed? force)Overrides org. Close the connection. |
| private void | |
| protected boolean | Returns: boolean true if the buffer has been emptied out, false otherwiseByteBuffer buf)Flushes the buffer to the network, non blocking |
| public boolean | flushOutbound()
Overrides org. Return true if the buffer wrote data. |
| public void | |
| public ByteBuffer | |
| public int | |
| public SSLEngine | |
| public SSLSupport | |
| public int | Returns: 0 if hand shake is complete, -1 if an error (other than an IOException) occurred, otherwise it returns a SelectionKey interestOps valueboolean - true if the underlying channel is readable read, boolean boolean - true if the underlying channel is writable write)Overrides org. Performs SSL handshake, non blocking, but performs NEED_TASK on the same thread. |
| protected SSLEngineResult | |
| protected SSLEngineResult | |
| public boolean | |
| public boolean | |
| private int | |
| public int | Returns: The number of bytes read, possibly zero, or-1 if
the channel has reached end-of-streamThe buffer into which bytes are to be transferred dst)Overrides org. Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| public long | read(ByteBuffer[]
The buffers into which bytes are to be transferred dsts, int The offset within the buffer array of the first buffer into
which bytes are to be transferred; must be non-negative and no
larger than offset, int dsts.lengthThe maximum number of buffers to be accessed; must be
non-negative and no larger than
length)dsts.length - offsetOverrides org. Implements java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. |
| public void | rehandshake(long
- timeout in milliseconds for each socket operation timeout)Force a blocking handshake to take place for this key. |
| public void | reset(SocketChannel
the socket channel channel, NioEndpoint.the socket wrapper socketWrapperOverrides org. Reset the channel |
| protected SSLEngineResult. | |
| public int | Returns: The number of bytes written, possibly zeroThe buffer from which bytes are to be retrieved src)Overrides org. Implements java. Writes a sequence of bytes to this channel from the given buffer. |
| public long | write(ByteBuffer[]
The buffers from which bytes are to be retrieved srcs, int The offset within the buffer array of the first buffer from
which bytes are to be retrieved; must be non-negative and no
larger than offset, int srcs.lengthThe maximum number of buffers to be accessed; must be
non-negative and no larger than
length)srcs.length - offsetOverrides org. Implements java. Writes a sequence of bytes to this channel from a subsequence of the given buffers. |
| additionalTlsAttributes | back to summary |
|---|---|
| private final Map<String, List<String>> additionalTlsAttributes | |
| closed | back to summary |
|---|---|
| protected boolean closed | |
| closing | back to summary |
|---|---|
| protected boolean closing | |
| DEFAULT_NET_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_NET_BUFFER_SIZE | |
| endpoint | back to summary |
|---|---|
| private final NioEndpoint endpoint | |
| handshakeComplete | back to summary |
|---|---|
| protected boolean handshakeComplete | |
| handshakeStatus | back to summary |
|---|---|
| protected SSLEngineResult. | |
| log | back to summary |
|---|---|
| private static final Log log | |
| netInBuffer | back to summary |
|---|---|
| protected ByteBuffer netInBuffer | |
| netOutBuffer | back to summary |
|---|---|
| protected ByteBuffer netOutBuffer | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| sniComplete | back to summary |
|---|---|
| protected boolean sniComplete | |
| sslEngine | back to summary |
|---|---|
| protected SSLEngine sslEngine | |
| SecureNioChannel | back to summary |
|---|---|
| public SecureNioChannel(SocketBufferHandler bufHandler, NioEndpoint endpoint) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides org. Implements java. Sends an SSL close message, will not physically close the connection here.
| |
| close | back to summary |
|---|---|
| public void close(boolean force) throws IOException Overrides org. Doc from org. Close the connection.
| |
| closeSilently | back to summary |
|---|---|
| private void closeSilently() | |
| flush | back to summary |
|---|---|
| protected boolean flush(ByteBuffer buf) throws IOException Flushes the buffer to the network, non blocking
| |
| flushOutbound | back to summary |
|---|---|
| public boolean flushOutbound() throws IOException Overrides org. Doc from org. Return true if the buffer wrote data. NO-OP for non-secure channel.
| |
| free | back to summary |
|---|---|
| public void free() Overrides org. Doc from org. Free the channel memory
| |
| getEmptyBuf | back to summary |
|---|---|
| public ByteBuffer getEmptyBuf() | |
| getOutboundRemaining | back to summary |
|---|---|
| public int getOutboundRemaining() Overrides org.
| |
| getSslEngine | back to summary |
|---|---|
| public SSLEngine getSslEngine() | |
| getSSLSupport | back to summary |
|---|---|
| public SSLSupport getSSLSupport() | |
| handshake | back to summary |
|---|---|
| public int handshake(boolean read, boolean write) throws IOException Overrides org. Performs SSL handshake, non blocking, but performs NEED_TASK on the same thread. Hence, you should never call this method using your Acceptor thread, as you would slow down your system significantly. If the return value from this method is positive, the selection key should be registered interestOps given by the return value.
| |
| handshakeUnwrap | back to summary |
|---|---|
| protected SSLEngineResult handshakeUnwrap(boolean doread) throws IOException Perform handshake unwrap
| |
| handshakeWrap | back to summary |
|---|---|
| protected SSLEngineResult handshakeWrap(boolean doWrite) throws IOException Performs the WRAP function
| |
| isClosing | back to summary |
|---|---|
| public boolean isClosing() Overrides org.
| |
| isHandshakeComplete | back to summary |
|---|---|
| public boolean isHandshakeComplete() Overrides org.
| |
| processSNI | back to summary |
|---|---|
| private int processSNI() throws IOException | |
| read | back to summary |
|---|---|
| public int read(ByteBuffer dst) throws IOException Overrides org. Implements java. Reads a sequence of bytes from this channel into the given buffer.
| |
| read | back to summary |
|---|---|
| public long read(ByteBuffer[] dsts, int offset, int length) throws IOException Overrides org. Implements java. Doc from java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. An invocation of this method attempts to read up to r bytes from this channel, where r is the total number of bytes remaining in the specified subsequence of the given buffer array, that is, dsts[offset].remaining() + dsts[offset+1].remaining() + ... + dsts[offset+length-1].remaining() Suppose that a byte sequence of length n is read, where
This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| rehandshake | back to summary |
|---|---|
| public void rehandshake(long timeout) throws IOException Force a blocking handshake to take place for this key. This requires that both network and application buffers have been emptied out prior to this call taking place, or a IOException will be thrown.
| |
| reset | back to summary |
|---|---|
| public void reset(SocketChannel channel, NioEndpoint. Overrides org. Doc from org. Reset the channel
| |
| tasks | back to summary |
|---|---|
| protected SSLEngineResult. Executes all the tasks needed on the same thread.
| |
| write | back to summary |
|---|---|
| public int write(ByteBuffer src) throws IOException Overrides org. Implements java. Writes a sequence of bytes to this channel from the given buffer.
| |
| write | back to summary |
|---|---|
| public long write(ByteBuffer[] srcs, int offset, int length) throws IOException Overrides org. Implements java. Doc from java. Writes a sequence of bytes to this channel from a subsequence of the given buffers. An attempt is made to write up to r bytes to this channel, where r is the total number of bytes remaining in the specified subsequence of the given buffer array, that is, srcs[offset].remaining() + srcs[offset+1].remaining() + ... + srcs[offset+length-1].remaining() Suppose that a byte sequence of length n is written, where
Unless otherwise specified, a write operation will return only after writing all of the r requested bytes. Some types of channels, depending upon their state, may write only some of the bytes or possibly none at all. A socket channel in non-blocking mode, for example, cannot write any more bytes than are free in the socket's output buffer. This method may be invoked at any time. If another thread has already initiated a write operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final SecureNioChannel. | |
| public static final SecureNioChannel. | |
| public static final SecureNioChannel. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SecureNioChannel. | |
| public static SecureNioChannel. |
| DONE | back to summary |
|---|---|
| public static final SecureNioChannel. | |
| NONE | back to summary |
|---|---|
| public static final SecureNioChannel. | |
| PROCESSING | back to summary |
|---|---|
| public static final SecureNioChannel. | |
| OverflowState | back to summary |
|---|---|
| private OverflowState() | |
| valueOf | back to summary |
|---|---|
| public static SecureNioChannel. | |
| values | back to summary |
|---|---|
| public static SecureNioChannel. | |