| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ReentrantLock | |
| private final ProtocolFamily | |
| private final FileDescriptor | |
| private final int | |
| private volatile boolean | |
| private boolean | |
| private SocketAddress | |
| private static final NativeDispatcher | |
| private ServerSocket | |
| private static final int | |
| private static final int | |
| private static final int | |
| private int | |
| private final Object | |
| private Thread |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv | ServerSocketChannelImpl(SelectorProvider sp, ProtocolFamily family, FileDescriptor fd, boolean bound)
|
| Modifier and Type | Method and Description |
|---|---|
| public SocketChannel | accept()
Implements abstract java. Accepts a connection made to this channel's socket. |
| private void | |
| public ServerSocketChannel | bind(SocketAddress local, int backlog)
Implements abstract java. Binds the channel's socket to a local address and configures the socket to listen for connections. |
| pack-priv SocketChannel | |
| private void | configureSocketNonBlockingIfVirtualThread()
Ensures that the socket is configured non-blocking when on a virtual thread. |
| private void | |
| private void | |
| private SocketChannel | |
| 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. |
| private int | |
| 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. |
| pack-priv boolean | |
| private boolean | |
| pack-priv boolean | |
| public void | |
| pack-priv SocketAddress | |
| private void | |
| private SocketAddress | |
| public <T> ServerSocketChannel | setOption(SocketOption<T> name, T value)
Implements abstract java. Implements java. Sets the value of a socket option. |
| public ServerSocket | socket()
Implements abstract java. Retrieves a server socket associated with this channel. |
| public final Set | supportedOptions()
Implements java. Returns a set of the socket options supported by this channel. |
| 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 set into a ready operation set |
| private boolean | tryClose()
Closes the socket if there are no accept in progress 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 SocketAddress |
| acceptLock | back to summary |
|---|---|
| private final ReentrantLock acceptLock | |
| family | back to summary |
|---|---|
| private final ProtocolFamily family | |
| fd | back to summary |
|---|---|
| private final FileDescriptor fd | |
| fdVal | back to summary |
|---|---|
| private final int fdVal | |
| forcedNonBlocking | back to summary |
|---|---|
| private volatile boolean forcedNonBlocking | |
| isReuseAddress | back to summary |
|---|---|
| private boolean isReuseAddress | |
| localAddress | back to summary |
|---|---|
| private SocketAddress localAddress | |
| nd | back to summary |
|---|---|
| private static final NativeDispatcher nd | |
| socket | back to summary |
|---|---|
| private ServerSocket socket | |
| ST_CLOSED | back to summary |
|---|---|
| private static final int ST_CLOSED | |
| ST_CLOSING | back to summary |
|---|---|
| private static final int ST_CLOSING | |
| ST_INUSE | back to summary |
|---|---|
| private static final int ST_INUSE | |
| state | back to summary |
|---|---|
| private int state | |
| stateLock | back to summary |
|---|---|
| private final Object stateLock | |
| thread | back to summary |
|---|---|
| private Thread thread | |
| ServerSocketChannelImpl | back to summary |
|---|---|
| pack-priv ServerSocketChannelImpl(SelectorProvider sp) throws IOException | |
| ServerSocketChannelImpl | back to summary |
|---|---|
| pack-priv ServerSocketChannelImpl(SelectorProvider sp, ProtocolFamily family) throws IOException | |
| ServerSocketChannelImpl | back to summary |
|---|---|
| pack-priv ServerSocketChannelImpl(SelectorProvider sp, ProtocolFamily family, FileDescriptor fd, boolean bound) throws IOException | |
| accept | back to summary |
|---|---|
| public SocketChannel accept() throws IOException Implements abstract java. Doc from java. Accepts a connection made to this channel's socket. If this channel is in non-blocking mode then this method will
immediately return The socket channel returned by this method, if any, will be in blocking mode regardless of the blocking mode of this channel.
| |
| begin | back to summary |
|---|---|
| private void begin(boolean blocking) throws ClosedChannelException Marks the beginning of an I/O operation that might block.
| |
| bind | back to summary |
|---|---|
| public ServerSocketChannel bind(SocketAddress local, int backlog) throws IOException Implements abstract java. Doc from java. Binds the channel's socket to a local address and configures the socket to listen for connections. This method is used to establish an association between the socket and a local address. For Internet protocol sockets, once an association is established then the socket remains bound until the channel is closed. The
| |
| blockingAccept | back to summary |
|---|---|
| pack-priv SocketChannel blockingAccept(long nanos) throws IOException Accepts a new connection with a given timeout. This method requires the channel to be configured in blocking mode. API Note This method is for use by the socket adaptor.
| |
| configureSocketNonBlockingIfVirtualThread | back to summary |
|---|---|
| private void configureSocketNonBlockingIfVirtualThread() throws IOException Ensures that the socket is configured non-blocking when on a virtual thread. | |
| end | back to summary |
|---|---|
| private void end(boolean blocking, boolean completed) throws AsynchronousCloseException Marks the end of an I/O operation that may have blocked.
| |
| ensureOpen | back to summary |
|---|---|
| private void ensureOpen() throws ClosedChannelException | |
| finishAccept | back to summary |
|---|---|
| private SocketChannel finishAccept(FileDescriptor newfd, SocketAddress sa) throws IOException | |
| getFD | back to summary |
|---|---|
| public FileDescriptor getFD() Implements sun. | |
| getFDVal | back to summary |
|---|---|
| public int getFDVal() Implements sun. | |
| getLocalAddress | back to summary |
|---|---|
| public SocketAddress getLocalAddress() throws IOException Implements abstract java. Implements java. Doc from java. Returns the socket address that this channel's socket is bound to. Where the channel is Where the channel is bound to a Unix Domain socket address, the socket
address is a
| |
| getOption | back to summary |
|---|---|
| public <T> T getOption(SocketOption<T> name) throws IOException Implements java. Doc from java. Returns the value of a socket option.
| |
| implAccept | back to summary |
|---|---|
| private int implAccept(FileDescriptor fd, FileDescriptor newfd, SocketAddress[] saa) throws IOException | |
| implCloseBlockingMode | back to summary |
|---|---|
| private void implCloseBlockingMode() throws IOException Closes this channel when configured in blocking mode. If there is an accept in progress then the socket is pre-closed and the accept thread is signalled, in which case the final close is deferred until the accept aborts. | |
| implCloseNonBlockingMode | back to summary |
|---|---|
| private void implCloseNonBlockingMode() throws IOException Closes this channel when configured in non-blocking mode. If the channel is registered with a Selector then the close is deferred until the channel is flushed from all Selectors. | |
| implCloseSelectableChannel | back to summary |
|---|---|
| protected void implCloseSelectableChannel() throws IOException Implements abstract java. Invoked by implCloseChannel to close the channel.
| |
| implConfigureBlocking | back to summary |
|---|---|
| protected void implConfigureBlocking(boolean block) throws IOException Implements abstract java. Doc from java. Adjusts this channel's blocking mode. This method is invoked by the
| |
| isBound | back to summary |
|---|---|
| pack-priv boolean isBound() Returns true if channel's socket is bound | |
| isNetSocket | back to summary |
|---|---|
| private boolean isNetSocket() Returns true if this channel is to a INET or INET6 socket. | |
| isUnixSocket | back to summary |
|---|---|
| pack-priv boolean isUnixSocket() Returns true if this channel is to a UNIX socket. | |
| kill | back to summary |
|---|---|
| public void kill() Implements sun.
| |
| localAddress | back to summary |
|---|---|
| pack-priv SocketAddress localAddress() Returns the local address, or null if not bound | |
| lockedConfigureBlocking | back to summary |
|---|---|
| private void lockedConfigureBlocking(boolean block) throws IOException Adjusts the blocking mode. | |
| netBind | back to summary |
|---|---|
| private SocketAddress netBind(SocketAddress local, int backlog) throws IOException | |
| setOption | back to summary |
|---|---|
| public <T> ServerSocketChannel setOption(SocketOption<T> name, T value) throws IOException Implements abstract java. Implements java. Doc from java. Sets the value of a socket option.
| |
| socket | back to summary |
|---|---|
| public ServerSocket socket() Implements abstract java. Doc from java. Retrieves a server socket associated with this channel. The returned object will not declare any public methods that are not
declared in the
| |
| supportedOptions | back to summary |
|---|---|
| public final Set Implements java. Doc from java. Returns a set of the socket options supported by this channel. This method will continue to return the set of options even after the channel has been closed.
| |
| 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- | |
| translateAndSetReadyOps | back to summary |
|---|---|
| public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) Implements sun. Doc from sun. Sets the specified ops if present in interestOps. The specified ops are turned on, and all other ops are turned off. | |
| translateAndUpdateReadyOps | back to summary |
|---|---|
| public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) Implements sun. Doc from sun. Adds the specified ops if present in interestOps. The specified ops are turned on without affecting the other ops. | |
| translateInterestOps | back to summary |
|---|---|
| public int translateInterestOps(int ops) Implements sun. Translates an interest operation set into a native poll event set | |
| translateReadyOps | back to summary |
|---|---|
| public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) Translates native poll revent set into a ready operation set | |
| tryClose | back to summary |
|---|---|
| private boolean tryClose() throws IOException Closes the socket if there are no accept in progress and the channel is not registered with a Selector. | |
| tryFinishClose | back to summary |
|---|---|
| private void tryFinishClose() Invokes tryClose to attempt to close the socket. This method is used for deferred closing by I/O and Selector operations. | |
| tryLockedConfigureBlocking | back to summary |
|---|---|
| private boolean tryLockedConfigureBlocking(boolean block) throws IOException Attempts to adjust the blocking mode if the channel is open.
| |
| unixBind | back to summary |
|---|---|
| private SocketAddress unixBind(SocketAddress local, int backlog) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Set | |
| pack-priv static final Set |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static Set | |
| private static Set |
| defaultInetOptions | back to summary |
|---|---|
| pack-priv static final Set<SocketOption<?>> defaultInetOptions | |
| defaultUnixDomainOptions | back to summary |
|---|---|
| pack-priv static final Set<SocketOption<?>> defaultUnixDomainOptions | |
| DefaultOptionsHolder | back to summary |
|---|---|
| private DefaultOptionsHolder() | |
| defaultInetOptions | back to summary |
|---|---|
| private static Set | |
| defaultUnixDomainOptions | back to summary |
|---|---|
| private static Set | |