java.nio.channels.spi

Class SelectorProvider

public abstract class SelectorProvider extends Object

Since: 1.4

Constructor Summary
protected SelectorProvider()
Initializes the selector provider.
Method Summary
abstract DatagramChannelopenDatagramChannel()
Opens a datagram channel.
abstract PipeopenPipe()
Opens a pipe.
abstract AbstractSelectoropenSelector()
Opens a selector.
abstract ServerSocketChannelopenServerSocketChannel()
Opens a server socket channel.
abstract SocketChannelopenSocketChannel()
Opens a socket channel.
static SelectorProviderprovider()
Returns the system-wide default selector provider for this invocation of the Java virtual machine.

Constructor Detail

SelectorProvider

protected SelectorProvider()
Initializes the selector provider.

Throws: SecurityException If a security manager has been installed and it denies @see RuntimePermission ("selectorProvider").

Method Detail

openDatagramChannel

public abstract DatagramChannel openDatagramChannel()
Opens a datagram channel.

Returns: a new datagram channel object

Throws: IOException if an error occurs

openPipe

public abstract Pipe openPipe()
Opens a pipe.

Returns: a new pipe object

Throws: IOException if an error occurs

openSelector

public abstract AbstractSelector openSelector()
Opens a selector.

Returns: a new selector object

Throws: IOException if an error occurs

openServerSocketChannel

public abstract ServerSocketChannel openServerSocketChannel()
Opens a server socket channel.

Returns: a new server socket channel object

Throws: IOException if an error occurs

openSocketChannel

public abstract SocketChannel openSocketChannel()
Opens a socket channel.

Returns: a new socket channel object

Throws: IOException if an error occurs

provider

public static SelectorProvider provider()
Returns the system-wide default selector provider for this invocation of the Java virtual machine.

Returns: the default seletor provider