An asynchronous channel 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.
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 abstract AsynchronousChannelGroup | Returns: A new asynchronous channel groupThe number of threads in the pool nThreads, ThreadFactory The factory to use when creating new threads threadFactory)Constructs a new asynchronous channel group with a fixed thread pool. |
public abstract AsynchronousChannelGroup | Returns: A new asynchronous channel groupThe thread pool executor, int A value initialSize)>=0 or a negative value for implementation
specific defaultConstructs a new asynchronous channel group with the given thread pool. |
public abstract AsynchronousServerSocketChannel | Returns: The new channelThe group to which the channel is bound, or group)null to
bind to the default groupOpens an asynchronous server-socket channel. |
public abstract AsynchronousSocketChannel | Returns: The new channelThe group to which the channel is bound, or group)null to
bind to the default groupOpens an asynchronous socket channel. |
public static AsynchronousChannelProvider | Returns: The system-wide default AsynchronousChannel providerReturns the system-wide default asynchronous channel provider for this invocation of the Java virtual machine. |
AsynchronousChannelProvider | back to summary |
---|---|
private AsynchronousChannelProvider(Void ignore) |
AsynchronousChannelProvider | back to summary |
---|---|
protected AsynchronousChannelProvider() Initializes a new instance of this class.
|
checkPermission | back to summary |
---|---|
private static Void checkPermission() |
openAsynchronousChannelGroup | back to summary |
---|---|
public abstract AsynchronousChannelGroup openAsynchronousChannelGroup(int nThreads, ThreadFactory threadFactory) throws IOException Constructs a new asynchronous channel group with a fixed thread pool.
|
openAsynchronousChannelGroup | back to summary |
---|---|
public abstract AsynchronousChannelGroup openAsynchronousChannelGroup(ExecutorService executor, int initialSize) throws IOException Constructs a new asynchronous channel group with the given thread pool.
|
openAsynchronousServerSocketChannel | back to summary |
---|---|
public abstract AsynchronousServerSocketChannel openAsynchronousServerSocketChannel(AsynchronousChannelGroup group) throws IOException Opens an asynchronous server-socket channel.
|
openAsynchronousSocketChannel | back to summary |
---|---|
public abstract AsynchronousSocketChannel openAsynchronousSocketChannel(AsynchronousChannelGroup group) throws IOException Opens an asynchronous socket channel.
|
provider | back to summary |
---|---|
public static AsynchronousChannelProvider provider() Returns the system-wide default asynchronous channel 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 AsynchronousChannelProvider |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
private static AsynchronousChannelProvider | |
private static AsynchronousChannelProvider | |
private static AsynchronousChannelProvider |
provider | back to summary |
---|---|
pack-priv static final AsynchronousChannelProvider provider |
ProviderHolder | back to summary |
---|---|
private ProviderHolder() |
load | back to summary |
---|---|
private static AsynchronousChannelProvider load()
|
loadProviderAsService | back to summary |
---|---|
private static AsynchronousChannelProvider loadProviderAsService() |
loadProviderFromProperty | back to summary |
---|---|
private static AsynchronousChannelProvider loadProviderFromProperty() |