|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.nio.channels.AsynchronousChannelGroup
com.sun.sgs.impl.nio.AsyncGroupImpl
abstract class AsyncGroupImpl
Common base implementation of AsynchronousChannelGroup.
| Field Summary | |
|---|---|
protected ExecutorService |
executor
The executor service for this group's tasks. |
(package private) Thread.UncaughtExceptionHandler |
uncaughtHandler
The UncaughtExceptionHandler for this group, or null. |
| Constructor Summary | |
|---|---|
protected |
AsyncGroupImpl(AsyncProviderImpl provider,
ExecutorService executor)
Constructs a new instance of this class. |
| Method Summary | ||
|---|---|---|
(package private)
|
completionRunner(CompletionHandler<R,A> handler,
A attachment,
Future<R> future)
Returns a runnable that will invoke the given completion handler. |
|
(package private) ExecutorService |
executor()
Returns the ExecutorService for this group. |
|
protected void |
finalize()
Invokes AsynchronousChannelGroup.shutdown() when this
group is no longer referenced. |
|
(package private) abstract AsyncKey |
register(SelectableChannel ch)
Registers the given channel with this group, returning an AsyncKey that can be used to invoke asynchronous IO
operations. |
|
(package private) SelectorProvider |
selectorProvider()
Returns the SelectorProvider for this group. |
|
| Methods inherited from class com.sun.sgs.nio.channels.AsynchronousChannelGroup |
|---|
awaitTermination, getDefaultUncaughtExceptionHandler, isShutdown, isTerminated, open, provider, setDefaultUncaughtExceptionHandler, shutdown, shutdownNow |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ExecutorService executor
volatile Thread.UncaughtExceptionHandler uncaughtHandler
null.
Accessed by AsyncProviderImpl if this is the default group.
| Constructor Detail |
|---|
protected AsyncGroupImpl(AsyncProviderImpl provider,
ExecutorService executor)
provider - the providerexecutor - the executor| Method Detail |
|---|
abstract AsyncKey register(SelectableChannel ch)
throws IOException
AsyncKey that can be used to invoke asynchronous IO
operations. If this group is shutdown, this method will throw
ShutdownChannelGroupException and close the channel.
ch - the underlying channel for IO operations
AsyncKey that supports asynchronous operations
on the underlying channel
IOException - if an I/O error occurs
ShutdownChannelGroupException - if this group is shutdown
<R,A> Runnable completionRunner(CompletionHandler<R,A> handler,
A attachment,
Future<R> future)
IoFuture constructed from the given
future and attachment object.
R - the result typeA - the attachment typehandler - the completion handlerattachment - the attachment, or nullfuture - the result
SelectorProvider selectorProvider()
SelectorProvider for this group.
SelectorProvider for this groupExecutorService executor()
ExecutorService for this group.
ExecutorService for this groupprotected void finalize()
AsynchronousChannelGroup.shutdown() when this
group is no longer referenced.
finalize in class Object
|
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 | |||||||||