Class NioServerBoss
- java.lang.Object
-
- org.jboss.netty.channel.socket.nio.AbstractNioSelector
-
- org.jboss.netty.channel.socket.nio.NioServerBoss
-
- All Implemented Interfaces:
java.lang.Runnable,Boss,NioSelector
public final class NioServerBoss extends AbstractNioSelector implements Boss
Boss implementation which handles accepting of new connections
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classNioServerBoss.RegisterTask
-
Field Summary
-
Fields inherited from class org.jboss.netty.channel.socket.nio.AbstractNioSelector
logger, selector, startupLatch, thread, wakenUp
-
-
Constructor Summary
Constructors Constructor Description NioServerBoss(java.util.concurrent.Executor bossExecutor)NioServerBoss(java.util.concurrent.Executor bossExecutor, ThreadNameDeterminer determiner)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidbind(NioServerSocketChannel channel, ChannelFuture future, java.net.SocketAddress localAddress)protected voidclose(java.nio.channels.SelectionKey k)(package private) voidclose(NioServerSocketChannel channel, ChannelFuture future)protected java.lang.RunnablecreateRegisterTask(Channel channel, ChannelFuture future)protected ThreadRenamingRunnablenewThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)protected voidprocess(java.nio.channels.Selector selector)private static voidregisterAcceptedChannel(NioServerSocketChannel parent, java.nio.channels.SocketChannel acceptedSocket, java.lang.Thread currentThread)protected intselect(java.nio.channels.Selector selector)-
Methods inherited from class org.jboss.netty.channel.socket.nio.AbstractNioSelector
cleanUpCancelledKeys, increaseCancelledKeys, isIoThread, rebuildSelector, register, registerTask, run, shutdown
-
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
-
-
-
-
Constructor Detail
-
NioServerBoss
NioServerBoss(java.util.concurrent.Executor bossExecutor)
-
NioServerBoss
NioServerBoss(java.util.concurrent.Executor bossExecutor, ThreadNameDeterminer determiner)
-
-
Method Detail
-
bind
void bind(NioServerSocketChannel channel, ChannelFuture future, java.net.SocketAddress localAddress)
-
close
protected void close(java.nio.channels.SelectionKey k)
- Specified by:
closein classAbstractNioSelector
-
close
void close(NioServerSocketChannel channel, ChannelFuture future)
-
process
protected void process(java.nio.channels.Selector selector)
- Specified by:
processin classAbstractNioSelector
-
registerAcceptedChannel
private static void registerAcceptedChannel(NioServerSocketChannel parent, java.nio.channels.SocketChannel acceptedSocket, java.lang.Thread currentThread)
-
select
protected int select(java.nio.channels.Selector selector) throws java.io.IOException- Overrides:
selectin classAbstractNioSelector- Throws:
java.io.IOException
-
newThreadRenamingRunnable
protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)
- Specified by:
newThreadRenamingRunnablein classAbstractNioSelector
-
createRegisterTask
protected java.lang.Runnable createRegisterTask(Channel channel, ChannelFuture future)
- Specified by:
createRegisterTaskin classAbstractNioSelector
-
-