diff --git a/src/main/java/org/jboss/netty/channel/Channel.java b/src/main/java/org/jboss/netty/channel/Channel.java index 31bbecfcc0..8d269f01fa 100644 --- a/src/main/java/org/jboss/netty/channel/Channel.java +++ b/src/main/java/org/jboss/netty/channel/Channel.java @@ -33,12 +33,11 @@ import java.util.UUID; *
* A channel provides a user: *
* Please down-cast to the transport-specific configuration type such as * {@link NioSocketChannelConfig} or use {@link #setOptions(Map)} to set the - * transport-specific properties. + * transport-specific properties: + *
+ * Channel ch = ...; + * NioSocketChannelConfig cfg = (NioSocketChannelConfig) ch.getConfig(); + * cfg.setWriteSpinCount(4); + ** * @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/ChannelDownstreamHandler.java b/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java index 4116c8b084..ba23561cb0 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java +++ b/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java @@ -48,23 +48,23 @@ import java.net.SocketAddress; *
diff --git a/src/main/java/org/jboss/netty/channel/ChannelEvent.java b/src/main/java/org/jboss/netty/channel/ChannelEvent.java index 138a84927c..42e5738592 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelEvent.java +++ b/src/main/java/org/jboss/netty/channel/ChannelEvent.java @@ -30,12 +30,14 @@ package org.jboss.netty.channel; * the event belongs to. Once an event is sent to a {@link ChannelPipeline}, * it is handled by a list of {@link ChannelHandler}s. * - *
- * If an event flows from the first handler to the last handler, we call it a - * upstream event and say "an event goes upstream". If an event flows from - * the last handler to the first handler, we call it a downstream event and say - * "an event goes downstream". + * If an event flows from the first handler to the last handler in a + * {@link ChannelPipeline}, we call it a upstream event and say "an event goes + * upstream". If an event flows from the last handler to the first handler in + * a {@link ChannelPipeline}, we call it a downstream event and say "an event + * goes downstream". (Please refer to the diagram in {@link ChannelPipeline} + * for more explanation.) *
* A {@link ChannelEvent} is interpreted differently by a {@link ChannelHandler} * depending on whether the event is a upstream event or a downstream event. @@ -48,7 +50,8 @@ package org.jboss.netty.channel; * Please refer to the documentation of {@link ChannelHandler} and its sub-types * ({@link ChannelUpstreamHandler} for upstream events and * {@link ChannelDownstreamHandler} for downstream events) to find out how - * a {@link ChannelEvent} is interpreted depending on the type of the handler. + * a {@link ChannelEvent} is interpreted depending on the type of the handler + * more in detail. * * @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/ChannelFactory.java b/src/main/java/org/jboss/netty/channel/ChannelFactory.java index 0138e31239..8a888900bf 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/ChannelFactory.java @@ -33,8 +33,8 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; *
* Once a new {@link Channel} is created, the {@link ChannelPipeline} which * was specified as a parameter in the {@link #newChannel(ChannelPipeline)} - * is attached to the new {@link Channel}, and starts to handle all - * {@link ChannelEvent}s associated with the new {@link Channel}. + * is attached to the new {@link Channel}, and starts to handle all associated + * {@link ChannelEvent}s. * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) @@ -47,8 +47,8 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; public interface ChannelFactory { /** - * Creates and opens a new {@link Channel} and attaches it to the - * specified {@link ChannelPipeline}. + * Creates and opens a new {@link Channel} and attaches the specified + * {@link ChannelPipeline} to the new {@link Channel}. * * @param pipeline the {@link ChannelPipeline} which is going to be * attached to the new {@link Channel} diff --git a/src/main/java/org/jboss/netty/channel/ChannelPipeline.java b/src/main/java/org/jboss/netty/channel/ChannelPipeline.java index 2e2749c035..daca62abec 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelPipeline.java +++ b/src/main/java/org/jboss/netty/channel/ChannelPipeline.java @@ -64,7 +64,12 @@ import org.jboss.netty.handler.ssl.SslHandler; *
* The following diagram describes how {@link ChannelEvent}s are processed by - * {@link ChannelHandler}s in a {@link ChannelPipeline} typically: + * {@link ChannelHandler}s in a {@link ChannelPipeline} typically. + * A {@link ChannelEvent} can be handled by either a {@link ChannelUpstreamHandler} + * or a {@link ChannelDownstreamHandler}. The meaning of the event is + * interpreted somewhat differently depending on whether it's going upstream or + * going downstream. Please refer to the {@link ChannelEvent} documentation + * for more explanation. * *
* I/O Request diff --git a/src/main/java/org/jboss/netty/channel/ChannelUpstreamHandler.java b/src/main/java/org/jboss/netty/channel/ChannelUpstreamHandler.java index 39096c442a..862ea735eb 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelUpstreamHandler.java +++ b/src/main/java/org/jboss/netty/channel/ChannelUpstreamHandler.java @@ -113,8 +113,9 @@ import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor; ** You also might want to refer to {@link ChannelDownstreamHandler} to see * how a {@link ChannelEvent} is interpreted when going downstream. Also, - * please refer to {@link ChannelEvent} to understand the fundamental difference - * between a upstream event and a downstream event. + * please refer to the {@link ChannelEvent} documentation to find out what a + * upstream event and a downstream event are and what fundamental differences + * they have, if you didn't read yet. *
* In most cases, you will get to use a {@link SimpleChannelHandler} to * implement a upstream handler because it provides an individual handler