public abstract class ServerSocketChannel extends java.nio.channels.spi.AbstractSelectableChannel
| Modifier | Constructor and Description |
|---|---|
protected |
ServerSocketChannel(java.nio.channels.spi.SelectorProvider provider)
Initializes this channel.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SocketChannel |
accept()
Accepts a connection made to this channel's socket.
|
static ServerSocketChannel |
open()
Opens a server socket channel.
|
abstract java.net.ServerSocket |
socket()
Retrieves the channels socket.
|
int |
validOps()
Retrieves the valid operations for this channel.
|
blockingLock, configureBlocking, implCloseChannel, implCloseSelectableChannel, implConfigureBlocking, isBlocking, isRegistered, keyFor, provider, registerregisterprotected ServerSocketChannel(java.nio.channels.spi.SelectorProvider provider)
public abstract SocketChannel accept() throws java.io.IOException
java.io.IOException - If an error occursAsynchronousCloseException - If another thread closes this
channel while the accept operation is in progress.ClosedByInterruptException - If another thread interrupts the
current thread while the accept operation is in progress, thereby closing
the channel and setting the current thread's interrupt status.ClosedChannelException - If the channel is closed.NotYetBoundException - If the channel's socket is not yet bound.java.lang.SecurityException - If a security manager has been installed and
it does not permit access to the remote endpoint of the new connection.public abstract java.net.ServerSocket socket()
public static ServerSocketChannel open() throws java.io.IOException
java.io.IOException - If an error occurspublic final int validOps()
validOps in class SelectableChannel