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 class
NioServerBoss.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) void
bind(NioServerSocketChannel channel, ChannelFuture future, java.net.SocketAddress localAddress)
protected void
close(java.nio.channels.SelectionKey k)
(package private) void
close(NioServerSocketChannel channel, ChannelFuture future)
protected java.lang.Runnable
createRegisterTask(Channel channel, ChannelFuture future)
protected ThreadRenamingRunnable
newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)
protected void
process(java.nio.channels.Selector selector)
private static void
registerAcceptedChannel(NioServerSocketChannel parent, java.nio.channels.SocketChannel acceptedSocket, java.lang.Thread currentThread)
protected int
select(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:
close
in classAbstractNioSelector
-
close
void close(NioServerSocketChannel channel, ChannelFuture future)
-
process
protected void process(java.nio.channels.Selector selector)
- Specified by:
process
in 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:
select
in classAbstractNioSelector
- Throws:
java.io.IOException
-
newThreadRenamingRunnable
protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)
- Specified by:
newThreadRenamingRunnable
in classAbstractNioSelector
-
createRegisterTask
protected java.lang.Runnable createRegisterTask(Channel channel, ChannelFuture future)
- Specified by:
createRegisterTask
in classAbstractNioSelector
-
-