Class NioClientBoss
- java.lang.Object
-
- org.jboss.netty.channel.socket.nio.NioClientBoss
-
-
Field Summary
Fields Modifier and Type Field Description protected static InternalLoggerloggerInternal Netty logger.protected SelectorselectorThe NIOSelector.protected ThreadthreadIf this worker has been started thread will be a reference to the thread used when starting.protected AtomicBooleanwakenUpBoolean that controls determines if a blocked Selector.select should break out of its selection process.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancleanUpCancelledKeys()protected voidclose(SelectionKey k)protected RunnablecreateRegisterTask(Channel channel, ChannelFuture future)protected voidincreaseCancelledKeys()protected booleanisIoThread()protected ThreadRenamingRunnablenewThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)protected voidprocess(Selector selector)voidrebuildSelector()voidregister(Channel channel, ChannelFuture future)protected voidregisterTask(Runnable task)voidrun()protected intselect(Selector selector)voidshutdown()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.netty.channel.socket.nio.NioSelector
rebuildSelector, register, shutdown
-
-
-
-
Field Detail
-
logger
protected static final InternalLogger logger
Internal Netty logger.
-
thread
protected volatile Thread thread
If this worker has been started thread will be a reference to the thread used when starting. i.e. the current thread when the run method is executed.
-
wakenUp
protected final AtomicBoolean wakenUp
Boolean that controls determines if a blocked Selector.select should break out of its selection process. In our case we use a timeone for the select method and the select method will block for that time unless waken up.
-
-
Method Detail
-
newThreadRenamingRunnable
protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)
-
createRegisterTask
protected Runnable createRegisterTask(Channel channel, ChannelFuture future)
-
process
protected void process(Selector selector)
-
close
protected void close(SelectionKey k)
-
register
public void register(Channel channel, ChannelFuture future)
- Specified by:
registerin interfaceNioSelector
-
registerTask
protected final void registerTask(Runnable task)
-
isIoThread
protected final boolean isIoThread()
-
rebuildSelector
public void rebuildSelector()
Description copied from interface:NioSelector- Specified by:
rebuildSelectorin interfaceNioSelector
-
increaseCancelledKeys
protected final void increaseCancelledKeys()
-
cleanUpCancelledKeys
protected final boolean cleanUpCancelledKeys() throws IOException- Throws:
IOException
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceNioSelector
-
select
protected int select(Selector selector) throws IOException
- Throws:
IOException
-
-