A selector provider is a concrete subclass of this class that has a
zero-argument constructor and implements the abstract methods specified
below. A given invocation of the Java virtual machine maintains a single
system-wide default provider instance, which is returned by the provider
method. The first invocation of that method will locate
the default provider as specified below.
The system-wide default provider is used by the static open
methods of the DatagramChannel
, Pipe
, Selector
, ServerSocketChannel
, and SocketChannel
classes. It is also
used by the System.
method. A program may make use of a provider other than the default provider
by instantiating that provider and then directly invoking the open
methods defined in this class.
All of the methods in this class are safe for use by multiple concurrent threads.
Modifier and Type | Class and Description |
---|---|
private static class |
Access | Constructor and Description |
---|---|
private | |
protected |
Modifier and Type | Method and Description |
---|---|
private static Void | |
public Channel | Returns: The inherited channel, if any, otherwisenull .Returns the channel inherited from the entity that created this Java virtual machine. |
public abstract DatagramChannel | |
public abstract DatagramChannel | Returns: A new datagram channelThe protocol family family)Opens a datagram channel. |
public abstract Pipe | |
public abstract AbstractSelector | |
public abstract ServerSocketChannel | |
public ServerSocketChannel | Returns: The new channelThe protocol family family)Opens a server-socket channel. |
public abstract SocketChannel | |
public SocketChannel | Returns: The new channelThe protocol family family)Opens a socket channel. |
public static SelectorProvider | Returns: The system-wide default selector providerReturns the system-wide default selector provider for this invocation of the Java virtual machine. |
SelectorProvider | back to summary |
---|---|
private SelectorProvider(Void ignore) |
SelectorProvider | back to summary |
---|---|
protected SelectorProvider() Initializes a new instance of this class.
|
checkPermission | back to summary |
---|---|
private static Void checkPermission() |
inheritedChannel | back to summary |
---|---|
public Channel inheritedChannel() throws IOException Returns the channel inherited from the entity that created this Java virtual machine. On many operating systems a process, such as a Java virtual machine, can be started in a manner that allows the process to inherit a channel from the entity that created the process. The manner in which this is done is system dependent, as are the possible entities to which the channel may be connected. For example, on UNIX systems, the Internet services daemon (inetd) is used to start programs to service requests when a request arrives on an associated network port. In this example, the process that is started, inherits a channel representing a network socket. In cases where the inherited channel is for an Internet protocol
socket then the
In cases where the inherited channel is for a Unix domain
socket then the In addition to the two types of socket just described, this method may return other types in the future. The first invocation of this method creates the channel that is returned. Subsequent invocations of this method return the same channel. Implementation Specification The default implementation of this method returns
|
openDatagramChannel | back to summary |
---|---|
public abstract DatagramChannel openDatagramChannel() throws IOException Opens a datagram channel.
|
openDatagramChannel | back to summary |
---|---|
public abstract DatagramChannel openDatagramChannel(ProtocolFamily family) throws IOException Opens a datagram channel.
|
openPipe | back to summary |
---|---|
public abstract Pipe openPipe() throws IOException Opens a pipe.
|
openSelector | back to summary |
---|---|
public abstract AbstractSelector openSelector() throws IOException Opens a selector.
|
openServerSocketChannel | back to summary |
---|---|
public abstract ServerSocketChannel openServerSocketChannel() throws IOException Opens a server-socket channel.
|
openServerSocketChannel | back to summary |
---|---|
public ServerSocketChannel openServerSocketChannel(ProtocolFamily family) throws IOException Opens a server-socket channel. Implementation Specification The default implementation of this method first checks that
the given protocol
|
openSocketChannel | back to summary |
---|---|
public abstract SocketChannel openSocketChannel() throws IOException Opens a socket channel.
|
openSocketChannel | back to summary |
---|---|
public SocketChannel openSocketChannel(ProtocolFamily family) throws IOException Opens a socket channel. Implementation Specification The default implementation of this method first checks that
the given protocol
|
provider | back to summary |
---|---|
public static SelectorProvider provider() Returns the system-wide default selector provider for this invocation of the Java virtual machine. The first invocation of this method locates the default provider object as follows:
Subsequent invocations of this method return the provider that was returned by the first invocation.
|
Modifier and Type | Field and Description |
---|---|
pack-priv static final SelectorProvider |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
private static SelectorProvider | |
private static SelectorProvider | |
pack-priv static SelectorProvider |
INSTANCE | back to summary |
---|---|
pack-priv static final SelectorProvider INSTANCE |
Holder | back to summary |
---|---|
private Holder() |
loadProviderAsService | back to summary |
---|---|
private static SelectorProvider loadProviderAsService() |
loadProviderFromProperty | back to summary |
---|---|
private static SelectorProvider loadProviderFromProperty() |
provider | back to summary |
---|---|
pack-priv static SelectorProvider provider()
|