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>
HoldsNioClientBoss
instances to use
-
-
Constructor Summary
Constructors Constructor Description NioClientBossPool(Executor bossExecutor, int bossCount)
Create a new instance using a newHashedWheelTimer
and noThreadNameDeterminer
NioClientBossPool(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 NioClientBoss
newBoss(Executor executor)
void
releaseExternalResources()
Releases the external resources that this object depends on.void
shutdown()
Shutdown theNioSelectorPool
and all internal created resources-
Methods inherited from class org.jboss.netty.channel.socket.nio.AbstractNioBossPool
init, nextBoss, rebuildSelectors
-
-
-
-
Constructor Detail
-
NioClientBossPool
public NioClientBossPool(Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner)
Create a new instance- Parameters:
bossExecutor
- the Executor to use for server theNioClientBoss
bossCount
- the number ofNioClientBoss
instances thisNioClientBossPool
will holdtimer
- the Timer to use for handle connect timeoutsdeterminer
- theThreadNameDeterminer
to use for name the threads. Usenull
if you not want to set one explicit.
-
NioClientBossPool
public NioClientBossPool(Executor bossExecutor, int bossCount)
Create a new instance using a newHashedWheelTimer
and noThreadNameDeterminer
- Parameters:
bossExecutor
- the Executor to use for server theNioClientBoss
bossCount
- the number ofNioClientBoss
instances thisNioClientBoss
will hold
-
-
Method Detail
-
newBoss
protected NioClientBoss newBoss(Executor executor)
Description copied from class:AbstractNioBossPool
- Specified by:
newBoss
in classAbstractNioBossPool<NioClientBoss>
- Parameters:
executor
- theExecutor
to use- Returns:
- worker the new
Boss
-
shutdown
public void shutdown()
Description copied from interface:NioSelectorPool
Shutdown theNioSelectorPool
and all internal created resources- Specified by:
shutdown
in interfaceNioSelectorPool
- Overrides:
shutdown
in classAbstractNioBossPool<NioClientBoss>
-
releaseExternalResources
public void releaseExternalResources()
Description copied from interface:ExternalResourceReleasable
Releases 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:
releaseExternalResources
in interfaceExternalResourceReleasable
- Overrides:
releaseExternalResources
in classAbstractNioBossPool<NioClientBoss>
-
-