Class NioClientBoss
java.lang.Object
org.jboss.netty.channel.socket.nio.NioClientBoss
- All Implemented Interfaces:
Runnable,Boss,NioSelector
Boss implementation that handles the connection attempts of clients-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final InternalLoggerInternal Netty logger.protected SelectorThe NIOSelector.protected ThreadIf 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.protected final AtomicBooleanBoolean that controls determines if a blocked Selector.select should break out of its selection process. -
Method Summary
Modifier and TypeMethodDescriptionprotected final booleanprotected voidprotected RunnablecreateRegisterTask(Channel channel, ChannelFuture future) protected final voidprotected final booleanprotected ThreadRenamingRunnablenewThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) protected voidvoidvoidregister(Channel channel, ChannelFuture future) protected final voidregisterTask(Runnable task) voidrun()protected intvoidshutdown()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.netty.channel.socket.nio.NioSelector
rebuildSelector, register, shutdown
-
Field Details
-
logger
Internal Netty logger. -
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. -
selector
The NIOSelector. -
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 Details
-
newThreadRenamingRunnable
-
createRegisterTask
-
process
-
close
-
register
- Specified by:
registerin interfaceNioSelector
-
registerTask
-
isIoThread
protected final boolean isIoThread() -
rebuildSelector
public void rebuildSelector()Description copied from interface:NioSelector- Specified by:
rebuildSelectorin interfaceNioSelector
-
run
public void run() -
increaseCancelledKeys
protected final void increaseCancelledKeys() -
cleanUpCancelledKeys
- Throws:
IOException
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceNioSelector
-
select
- Throws:
IOException
-