Class NioClientBossPool
- java.lang.Object
-
- org.jboss.netty.channel.socket.nio.AbstractNioBossPool<NioClientBoss>
-
- org.jboss.netty.channel.socket.nio.NioClientBossPool
-
- All Implemented Interfaces:
BossPool<NioClientBoss>,NioSelectorPool,ExternalResourceReleasable
public class NioClientBossPool extends AbstractNioBossPool<NioClientBoss>
HoldsNioClientBossinstances to use
-
-
Field Summary
Fields Modifier and Type Field Description private ThreadNameDeterminerdeterminerprivate booleanstopTimerprivate Timertimer
-
Constructor Summary
Constructors Constructor Description NioClientBossPool(java.util.concurrent.Executor bossExecutor, int bossCount)Create a new instance using a newHashedWheelTimerand noThreadNameDeterminerNioClientBossPool(java.util.concurrent.Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner)Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NioClientBossnewBoss(java.util.concurrent.Executor executor)Create a newBosswhich uses the givenExecutorto service IOvoidreleaseExternalResources()Releases the external resources that this object depends on.voidshutdown()Shutdown theNioSelectorPooland all internal created resources-
Methods inherited from class org.jboss.netty.channel.socket.nio.AbstractNioBossPool
init, nextBoss, rebuildSelectors
-
-
-
-
Field Detail
-
determiner
private final ThreadNameDeterminer determiner
-
timer
private final Timer timer
-
stopTimer
private boolean stopTimer
-
-
Constructor Detail
-
NioClientBossPool
public NioClientBossPool(java.util.concurrent.Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner)Create a new instance- Parameters:
bossExecutor- the Executor to use for server theNioClientBossbossCount- the number ofNioClientBossinstances thisNioClientBossPoolwill holdtimer- the Timer to use for handle connect timeoutsdeterminer- theThreadNameDeterminerto use for name the threads. Usenullif you not want to set one explicit.
-
NioClientBossPool
public NioClientBossPool(java.util.concurrent.Executor bossExecutor, int bossCount)Create a new instance using a newHashedWheelTimerand noThreadNameDeterminer- Parameters:
bossExecutor- the Executor to use for server theNioClientBossbossCount- the number ofNioClientBossinstances thisNioClientBosswill hold
-
-
Method Detail
-
newBoss
protected NioClientBoss newBoss(java.util.concurrent.Executor executor)
Description copied from class:AbstractNioBossPoolCreate a newBosswhich uses the givenExecutorto service IO- Specified by:
newBossin classAbstractNioBossPool<NioClientBoss>- Parameters:
executor- theExecutorto use- Returns:
- worker the new
Boss
-
shutdown
public void shutdown()
Description copied from interface:NioSelectorPoolShutdown theNioSelectorPooland all internal created resources- Specified by:
shutdownin interfaceNioSelectorPool- Overrides:
shutdownin classAbstractNioBossPool<NioClientBoss>
-
releaseExternalResources
public void releaseExternalResources()
Description copied from interface:ExternalResourceReleasableReleases the external resources that this object depends on. You should not call this method if the external resources (e.g. thread pool) are in use by other objects.- Specified by:
releaseExternalResourcesin interfaceExternalResourceReleasable- Overrides:
releaseExternalResourcesin classAbstractNioBossPool<NioClientBoss>
-
-