com.sun.grizzly
Class SelectorHandlerRunner
java.lang.Object
com.sun.grizzly.SelectorHandlerRunner
- All Implemented Interfaces:
- java.lang.Runnable
public class SelectorHandlerRunner
- extends java.lang.Object
- implements java.lang.Runnable
Class is responsible for processing certain (single)
SelectorHandler
- Author:
- Alexey Stashok
|
Field Summary |
protected static java.util.logging.Logger |
logger
Default Logger. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final java.util.logging.Logger logger
- Default Logger.
SelectorHandlerRunner
public SelectorHandlerRunner(Controller controller,
SelectorHandler selectorHandler)
getSelectorHandler
public SelectorHandler getSelectorHandler()
run
public void run()
- Specified by:
run in interface java.lang.Runnable
continueSelect
protected boolean continueSelect(SelectorHandler selectorHandler,
NIOContext serverCtx)
doSelect
protected boolean doSelect(SelectorHandler selectorHandler,
NIOContext serverCtx)
- This method handle the processing of all Selector's interest op
(OP_ACCEPT,OP_READ,OP_WRITE,OP_CONNECT) by delegating to its Handler.
By default, all java.nio.channels.Selector operations are implemented
using SelectorHandler. All SelectionKey operations are implemented by
SelectionKeyHandler. Finally, ProtocolChain creation/re-use are implemented
by InstanceHandler.
- Parameters:
selectorHandler - - the SelectorHandler
switchToNewSelector
protected static void switchToNewSelector(SelectorHandler selectorHandler)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2012 Oracle Corporation. All Rights Reserved.