From 6df482b0749ca93b86a9b82779c4276b56ef1f63 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 26 Nov 2008 10:30:21 +0000 Subject: [PATCH] Added documentation to-dos --- src/main/java/org/jboss/netty/channel/ChannelFactory.java | 2 ++ .../channel/socket/nio/NioClientSocketChannelFactory.java | 3 ++- .../channel/socket/nio/NioServerSocketChannelFactory.java | 3 ++- .../channel/socket/oio/OioClientSocketChannelFactory.java | 3 ++- .../channel/socket/oio/OioServerSocketChannelFactory.java | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/ChannelFactory.java b/src/main/java/org/jboss/netty/channel/ChannelFactory.java index 48fd521321..6a7d97cc53 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/ChannelFactory.java @@ -36,6 +36,8 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; * is attached to the new {@link Channel}, and starts to handle all associated * {@link ChannelEvent}s. * + * TODO: Document how to shut down a service using ChannelFactoryResource. + * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) * 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 0eccc80bc1..0399c54092 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 @@ -30,10 +30,10 @@ import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.ChannelFactoryResource; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelSink; -import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.socket.ClientSocketChannelFactory; import org.jboss.netty.channel.socket.SocketChannel; @@ -62,6 +62,7 @@ import org.jboss.netty.channel.socket.SocketChannel; * more {@link Channel}s in a non-blocking mode. * *

Life cycle of threads and graceful shutdown

+ * TODO: Rewrite this section to recommend a user to call ChannelFactoryResource.release(). *

* All threads are acquired from the {@link Executor}s which were specified * when a {@link NioClientSocketChannelFactory} was created. A boss thread is 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 67744b0d28..3bed335b8d 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 @@ -30,10 +30,10 @@ import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.ChannelFactoryResource; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelSink; -import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.socket.ServerSocketChannel; import org.jboss.netty.channel.socket.ServerSocketChannelFactory; @@ -64,6 +64,7 @@ import org.jboss.netty.channel.socket.ServerSocketChannelFactory; * more {@link Channel}s in a non-blocking mode. * *

Life cycle of threads and graceful shutdown

+ * TODO: Rewrite this section to recommend a user to call ChannelFactoryResource.release(). *

* All threads are acquired from the {@link Executor}s which were specified * when a {@link NioServerSocketChannelFactory} was created. Boss threads are 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 16505dc667..81f2b5a312 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 @@ -28,9 +28,9 @@ import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.ChannelFactoryResource; import org.jboss.netty.channel.ChannelPipeline; -import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.socket.ClientSocketChannelFactory; import org.jboss.netty.channel.socket.SocketChannel; @@ -51,6 +51,7 @@ import org.jboss.netty.channel.socket.SocketChannel; * traditional blocking I/O thread model. * *

Life cycle of threads and graceful shutdown

+ * TODO: Rewrite this section to recommend a user to call ChannelFactoryResource.release(). *

* Worker threads are acquired from the {@link Executor} which was specified * when a {@link OioClientSocketChannelFactory} was created (i.e. {@code 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 99882815d9..19a651ef0e 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 @@ -28,10 +28,10 @@ import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.ChannelFactoryResource; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelSink; -import org.jboss.netty.channel.ChannelFactoryExecutorResource; import org.jboss.netty.channel.socket.ServerSocketChannel; import org.jboss.netty.channel.socket.ServerSocketChannelFactory; @@ -61,6 +61,7 @@ import org.jboss.netty.channel.socket.ServerSocketChannelFactory; * traditional blocking I/O thread model. * *

Life cycle of threads and graceful shutdown

+ * TODO: Rewrite this section to recommend a user to call ChannelFactoryResource.release(). *

* All threads are acquired from the {@link Executor}s which were specified * when a {@link OioServerSocketChannelFactory} was created. Boss threads are