java.nio.channels.spi
Class SelectorProvider

java.lang.Object
  extended by java.nio.channels.spi.SelectorProvider

public abstract class SelectorProvider
extends Object

Since:
1.4

Constructor Summary
protected SelectorProvider()
          Initializes the selector provider.
 
Method Summary
 Channel inheritedChannel()
          Returns the inherited channel of the VM.
abstract  DatagramChannel openDatagramChannel()
          Opens a datagram channel.
abstract  Pipe openPipe()
          Opens a pipe.
abstract  AbstractSelector openSelector()
          Opens a selector.
abstract  ServerSocketChannel openServerSocketChannel()
          Opens a server socket channel.
abstract  SocketChannel openSocketChannel()
          Opens a socket channel.
static SelectorProvider provider()
          Returns the system-wide default selector provider for this invocation of the Java virtual machine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()
                                             throws IOException
Opens a datagram channel.

Returns:
a new datagram channel object
Throws:
IOException - if an error occurs

openPipe

public abstract Pipe openPipe()
                       throws IOException
Opens a pipe.

Returns:
a new pipe object
Throws:
IOException - if an error occurs

openSelector

public abstract AbstractSelector openSelector()
                                       throws IOException
Opens a selector.

Returns:
a new selector object
Throws:
IOException - if an error occurs

openServerSocketChannel

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

Returns:
a new server socket channel object
Throws:
IOException - if an error occurs

openSocketChannel

public abstract SocketChannel openSocketChannel()
                                         throws IOException
Opens a socket channel.

Returns:
a new socket channel object
Throws:
IOException - if an error occurs

inheritedChannel

public Channel inheritedChannel()
                         throws IOException
Returns the inherited channel of the VM.

Returns:
the inherited channel of the VM
Throws:
IOException - If an I/O error occurs
SecurityException - If an installed security manager denies access to RuntimePermission("inheritedChannel")
Since:
1.5

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