diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java index 989988c09f..fc83356b51 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java @@ -120,7 +120,7 @@ public class NioClientSocketChannelFactory implements ClientSocketChannelFactory * @param workerExecutor * the {@link Executor} which will execute the I/O worker threads * @param workerCount - * the number of I/O worker threads to start + * the maximum number of I/O worker threads */ public NioClientSocketChannelFactory( Executor bossExecutor, Executor workerExecutor, diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java index dca78e133a..c8b26d90f3 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java @@ -100,11 +100,32 @@ public class NioServerSocketChannelFactory implements ServerSocketChannelFactory final Executor bossExecutor; private final ChannelSink sink; + /** + * Creates a new instance. Calling this constructor is same with calling + * {@link #NioServerSocketChannelFactory(Executor, Executor, int)} with + * the number of available processors in the machine. The number of + * available processors is calculated by {@link Runtime#availableProcessors()}. + * + * @param bossExecutor + * the {@link Executor} which will execute the boss threads + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + */ public NioServerSocketChannelFactory( Executor bossExecutor, Executor workerExecutor) { this(bossExecutor, workerExecutor, Runtime.getRuntime().availableProcessors()); } + /** + * Creates a new instance. + * + * @param bossExecutor + * the {@link Executor} which will execute the boss threads + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + * @param workerCount + * the maximum number of I/O worker threads + */ public NioServerSocketChannelFactory( Executor bossExecutor, Executor workerExecutor, int workerCount) { diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java index b0e2177ad3..0dd20d2811 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java @@ -88,6 +88,12 @@ public class OioClientSocketChannelFactory implements ClientSocketChannelFactory final OioClientSocketPipelineSink sink; + /** + * Creates a new instance. + * + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + */ public OioClientSocketChannelFactory(Executor workerExecutor) { if (workerExecutor == null) { throw new NullPointerException("workerExecutor"); diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java index 1158d73019..09092eccd9 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java @@ -101,6 +101,14 @@ public class OioServerSocketChannelFactory implements ServerSocketChannelFactory final Executor bossExecutor; private final ChannelSink sink; + /** + * Creates a new instance. + * + * @param bossExecutor + * the {@link Executor} which will execute the boss threads + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + */ public OioServerSocketChannelFactory( Executor bossExecutor, Executor workerExecutor) { if (bossExecutor == null) {