| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final ProtocolFamily | |
| private final FileDescriptor | |
| private final int | |
| private volatile boolean | |
| private volatile boolean | |
| private volatile boolean | |
| private boolean | |
| private SocketAddress | |
| private static final NativeDispatcher | |
| private Thread | |
| private final ReentrantLock | |
| private SocketAddress | |
| private Socket | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private volatile int | |
| private final Object | |
| private final ReentrantLock | |
| private Thread |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv | SocketChannelImpl(SelectorProvider sp, ProtocolFamily family, FileDescriptor fd, SocketAddress remoteAddress)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv int | |
| pack-priv void | |
| private void | beginConnect(boolean
true if configured blocking blocking, SocketAddress the remote socket address sa)Marks the beginning of a connect operation that might block. |
| private void | beginFinishConnect(boolean blocking)
Marks the beginning of a finishConnect operation that might block. |
| private void | |
| private void | |
| public SocketChannel | bind(SocketAddress local)
Implements abstract java. Implements java. Binds the channel's socket to a local address. |
| pack-priv void | blockingConnect(SocketAddress remote, long nanos)
Attempts to establish a connection to the given socket address with a timeout. |
| pack-priv int | blockingRead(byte[] b, int off, int len, long nanos)
Reads bytes from the socket into the given byte array. |
| pack-priv void | blockingWriteFully(byte[] b, int off, int len)
Writes a sequence of bytes to the socket from the given byte array. |
| private SocketAddress | |
| private void | configureSocketNonBlockingIfVirtualThread()
Ensures that the socket is configured non-blocking when on a virtual thread. |
| public boolean | connect(SocketAddress remote)
Implements abstract java. Connects this channel's socket. |
| private void | endConnect(boolean blocking, boolean completed)
Marks the end of a connect operation that may have blocked. |
| private void | endFinishConnect(boolean blocking, boolean completed)
Marks the end of a finishConnect operation that may have blocked. |
| private void | endRead(boolean blocking, boolean completed)
Marks the end of a read operation that may have blocked. |
| private void | endWrite(boolean blocking, boolean completed)
Marks the end of a write operation that may have blocked. |
| private void | |
| private void | |
| public boolean | finishConnect()
Implements abstract java. Finishes the process of connecting a socket channel. |
| private boolean | |
| public FileDescriptor | |
| public int | |
| public SocketAddress | getLocalAddress()
Implements abstract java. Implements java. Returns the socket address that this channel's socket is bound to. |
| public <T> T | getOption(SocketOption<T> name)
Implements java. Returns the value of a socket option. |
| public SocketAddress | getRemoteAddress()
Implements abstract java. Returns the remote address to which this channel's socket is connected. |
| private void | |
| private void | |
| protected void | implCloseSelectableChannel()
Implements abstract java. Invoked by implCloseChannel to close the channel. |
| protected void | implConfigureBlocking(boolean block)
Implements abstract java. Adjusts this channel's blocking mode. |
| private int | |
| private long | |
| private int | |
| private long | |
| public boolean | isConnected()
Implements abstract java. Tells whether or not this channel's network socket is connected. |
| public boolean | isConnectionPending()
Implements abstract java. Tells whether or not a connection operation is in progress on this channel. |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| public void | |
| pack-priv SocketAddress | |
| private void | |
| private SocketAddress | |
| public int | read(ByteBuffer buf)
Implements abstract java. Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| public long | read(ByteBuffer[] dsts, int offset, int length)
Implements abstract java. Implements java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. |
| pack-priv SocketAddress | |
| pack-priv int | |
| public <T> SocketChannel | setOption(SocketOption<T> name, T value)
Implements abstract java. Implements java. Sets the value of a socket option. |
| public SocketChannel | shutdownInput()
Implements abstract java. Shutdown the connection for reading without closing the channel. |
| public SocketChannel | shutdownOutput()
Implements abstract java. Shutdown the connection for writing without closing the channel. |
| public Socket | socket()
Implements abstract java. Retrieves a socket associated with this channel. |
| public final Set | supportedOptions()
Implements java. Returns a set of the socket options supported by this channel. |
| private void | |
| private int | timedRead(byte[] b, int off, int len, long nanos)
Reads bytes from the socket into the given byte array with a timeout. |
| public String | |
| public boolean | translateAndSetReadyOps(int ops, SelectionKeyImpl ski)
Implements sun. Sets the specified ops if present in interestOps. |
| public boolean | translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski)
Implements sun. Adds the specified ops if present in interestOps. |
| public int | translateInterestOps(int ops)
Implements sun. Translates an interest operation set into a native poll event set |
| public boolean | translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski)
Translates native poll revent ops into a ready operation ops |
| private boolean | tryClose()
Closes the socket if there are no I/O operations in progress (or no I/O operations tracked), and the channel is not registered with a Selector. |
| private void | |
| private boolean | Returns: true if the blocking mode was adjustedAttempts to adjust the blocking mode if the channel is open. |
| private int | tryRead(byte[] b, int off, int len)
Attempts to read bytes from the socket into the given byte array. |
| private int | tryWrite(byte[] b, int off, int len)
Attempts to write a sequence of bytes to the socket from the given byte array. |
| private SocketAddress | |
| public int | write(ByteBuffer buf)
Implements abstract java. Implements java. Writes a sequence of bytes to this channel from the given buffer. |
| public long | write(ByteBuffer[] srcs, int offset, int length)
Implements abstract java. Implements java. Writes a sequence of bytes to this channel from a subsequence of the given buffers. |