|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.nio.channels.spi.AsynchronousChannelProvider
public abstract class AsynchronousChannelProvider
Service-provider class for asynchronous channels.
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.
If the system-wide default provider implements
ManagedChannelFactory then the management interfaces for the
pools of channels created by the provider will be included in the list of
ChannelPoolMXBean objects returned by the
Channels.getChannelPoolMXBeans() method
[[NOT IMPLEMENTED: and also registered with the platform MBeanServer
when the MBeanServer is obtained by invoking the
ManagementFactory.getPlatformMBeanServer() method]].
To ensure that the ObjectName for uniquely identifying the
ChannelPoolMXBean objects is unique it is recommended that the
pool name is "asynchronous.name" where name
identifies the provider's channel pool.
All of the methods in this class are safe for use by multiple concurrent threads.
NOT IMPLEMENTED: openAsynchronousFileChannel
| Method Summary | |
|---|---|
abstract Thread.UncaughtExceptionHandler |
getUncaughtExceptionHandler()
Returns the uncaught exception handler for the default group. |
abstract AsynchronousChannelGroup |
openAsynchronousChannelGroup(ExecutorService executor)
Constructs a new asynchronous channel group. |
abstract AsynchronousDatagramChannel |
openAsynchronousDatagramChannel(ProtocolFamily pf,
AsynchronousChannelGroup group)
Opens an asynchronous datagram channel. |
abstract AsynchronousServerSocketChannel |
openAsynchronousServerSocketChannel(AsynchronousChannelGroup group)
Opens an asynchronous server-socket channel. |
abstract AsynchronousSocketChannel |
openAsynchronousSocketChannel(AsynchronousChannelGroup group)
Opens an asynchronous socket channel. |
static AsynchronousChannelProvider |
provider()
Returns the system-wide default asynchronous channel provider for this invocation of the Java virtual machine. |
abstract void |
setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)
Set the uncaught exception handler for the default group. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AsynchronousChannelProvider provider()
The first invocation of this method locates the default provider object as follows:
com.sun.sgs.nio.channels.spi.AsynchronousChannelProvider is
defined then it is taken to be the fully-qualified name of a concrete
provider class. The class is loaded and instantiated; if this process
fails then an unspecified error is thrown.
java.nio.channels.spi.AsynchronousChannelProvider
in the resource
directory META-INF/services, then the first class name specified
in that file is taken. The class is loaded and instantiated; if this
process fails then an unspecified error is thrown.]]
AsynchronousChannel provider
public abstract AsynchronousChannelGroup openAsynchronousChannelGroup(ExecutorService executor)
throws IOException
executor - the executor service
IOException - if an I/O error occurs
public abstract AsynchronousServerSocketChannel openAsynchronousServerSocketChannel(AsynchronousChannelGroup group)
throws IOException
group - the group to which the channel is bound, or null
to bind to the default group
IllegalArgumentException - if the provider that created the
group differs from this provider
ShutdownChannelGroupException - if the group is shutdown
IOException - if an I/O error occurs
public abstract AsynchronousSocketChannel openAsynchronousSocketChannel(AsynchronousChannelGroup group)
throws IOException
group - the group to which the channel is bound, or null
to bind to the default group
IllegalArgumentException - if the provider that created the
group differs from this provider
ShutdownChannelGroupException - if the group is shutdown
IOException - if an I/O error occurs
public abstract AsynchronousDatagramChannel openAsynchronousDatagramChannel(ProtocolFamily pf,
AsynchronousChannelGroup group)
throws IOException
pf - the protocol family, or null for the default protocol
familygroup - the group to which the channel is bound, or null
to bind to the default group
IllegalArgumentException - if the provider that created the
group differs from this provider
ShutdownChannelGroupException - if the group is shutdown
IOException - if an I/O error occurspublic abstract void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)
eh - the object to use as the default uncaught exception
handler, or null for no default handler
SecurityException - [TBD]public abstract Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
null if there is no default handler
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||