From c344058a6ff84b42721455b791549f71b88d6912 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 2 Sep 2008 07:33:01 +0000 Subject: [PATCH] * Interpretation -> Meaning * Added more explanation to ChannelState --- .../channel/ChannelDownstreamHandler.java | 2 +- .../org/jboss/netty/channel/ChannelState.java | 44 ++++++++++++++----- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java b/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java index e6b0c209df..1280045272 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java +++ b/src/main/java/org/jboss/netty/channel/ChannelDownstreamHandler.java @@ -42,7 +42,7 @@ import java.net.SocketAddress; * * * - * + * * * * diff --git a/src/main/java/org/jboss/netty/channel/ChannelState.java b/src/main/java/org/jboss/netty/channel/ChannelState.java index ccca3580ea..158ac1a88c 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelState.java +++ b/src/main/java/org/jboss/netty/channel/ChannelState.java @@ -25,33 +25,57 @@ package org.jboss.netty.channel; import java.net.SocketAddress; /** - * Represents the current state of a {@link Channel} combined with the - * {@linkplain ChannelStateEvent#getValue() value} of a {@link ChannelStateEvent}. + * Represents the current or requested state of a {@link Channel}. + *

+ * The state of a {@link Channel} is interpreted differently depending on the + * {@linkplain ChannelStateEvent#getValue() value} of a {@link ChannelStateEvent} + * and the direction of the event propagation in a {@link ChannelPipeline}: * *

Event type and conditionInterperatationEvent type and conditionMeaning
{@link MessageEvent}Send a message to the {@link Channel}.
* - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * *
StateValueDescriptionDirectionStateValueMeaning
{@link #OPEN}{@code true}The channel is open.Upstream{@link #OPEN}{@code true}The channel is open.
{@link #OPEN}{@code false}The channel is closed.Upstream{@link #OPEN}{@code false}The channel is closed.
{@link #BOUND}{@link SocketAddress}The channel is bound to a local address.Upstream{@link #BOUND}{@link SocketAddress}The channel is bound to a local address.
{@link #BOUND}{@code null}The channel is unbound to a local address.Upstream{@link #BOUND}{@code null}The channel is unbound to a local address.
{@link #CONNECTED}{link SocketAddress}The channel is connected to a remote address.Upstream{@link #CONNECTED}{@link SocketAddress}The channel is connected to a remote address.
{@link #CONNECTED}{@code null}The channel is disconnected from a remote address.Upstream{@link #CONNECTED}{@code null}The channel is disconnected from a remote address.
{@link #INTEREST_OPS}an integerThe channel interestOps has been changed.Upstream{@link #INTEREST_OPS}an integerThe channel interestOps has been changed.
Downstream{@link #OPEN}{@code true}N/A
Downstream{@link #OPEN}{@code false}Close the channel.
Downstream{@link #BOUND}{@link SocketAddress}Bind the channel to the specified local address.
Downstream{@link #BOUND}{@code null}Unbind the channel from the current local address.
Downstream{@link #CONNECTED}{@link SocketAddress}Connect the channel to the specified remote address.
Downstream{@link #CONNECTED}{@code null}Disconnect the channel from the current remote address.
Downstream{@link #INTEREST_OPS}an integerChange the interestOps of the channel.
*