java.lang.Object | +--java.nio.channels.spi.AbstractInterruptibleChannel | +--java.nio.channels.SelectableChannel | +--java.nio.channels.spi.AbstractSelectableChannel | +--java.nio.channels.ServerSocketChannel
ServerSocketChannel(java.nio.channels.spi.SelectorProvider provider) Initializes this channel. |
java.nio.channels.SocketChannel | accept() Accepts a connection made to this channel's socket. |
static java.nio.channels.ServerSocketChannel | open() Opens a server socket channel. |
java.net.ServerSocket | socket() Retrieves the channels socket. |
int | validOps() Retrieves the valid operations for this channel. |
public ServerSocketChannel(java.nio.channels.spi.SelectorProvider provider)
provider
- public SocketChannel accept()
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.SecurityException
- If a security manager has been installed and
it does not permit access to the remote endpoint of the new connection.public static ServerSocketChannel open()
IOException
- If an error occurspublic ServerSocket socket()
public final int validOps()