com.sun.grizzly
Class SelectorHandlerRunner
java.lang.Object
com.sun.grizzly.SelectorHandlerRunner
- All Implemented Interfaces:
- Runnable
public class SelectorHandlerRunner
- extends Object
- implements Runnable
Class is responsible for processing certain (single)
SelectorHandler
- Author:
- Alexey Stashok
Field Summary |
protected static 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 Logger logger
- Default Logger.
SelectorHandlerRunner
public SelectorHandlerRunner(Controller controller,
SelectorHandler selectorHandler)
getSelectorHandler
public SelectorHandler getSelectorHandler()
run
public void run()
- Specified by:
run
in interface 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 IOException
- Throws:
IOException
Copyright © 2012 Oracle Corporation. All Rights Reserved.