org.jboss.netty.channel
Enum ChannelState

java.lang.Object
  extended by java.lang.Enum<ChannelState>
      extended by org.jboss.netty.channel.ChannelState
All Implemented Interfaces:
Serializable, Comparable<ChannelState>

public enum ChannelState
extends Enum<ChannelState>

The current or future state of a Channel.

The state of a Channel is interpreted differently depending on the value of a ChannelStateEvent and the direction of the event in a ChannelPipeline:

DirectionStateValueMeaning
UpstreamOPENtrueThe channel is open.
UpstreamOPENfalseThe channel is closed.
UpstreamBOUNDSocketAddressThe channel is bound to a local address.
UpstreamBOUNDnullThe channel is unbound to a local address.
UpstreamCONNECTEDSocketAddressThe channel is connected to a remote address.
UpstreamCONNECTEDnullThe channel is disconnected from a remote address.
UpstreamINTEREST_OPSan integerThe channel interestOps has been changed.
DownstreamOPENtrueN/A
DownstreamOPENfalseClose the channel.
DownstreamBOUNDSocketAddressBind the channel to the specified local address.
DownstreamBOUNDnullUnbind the channel from the current local address.
DownstreamCONNECTEDSocketAddressConnect the channel to the specified remote address.
DownstreamCONNECTEDnullDisconnect the channel from the current remote address.
DownstreamINTEREST_OPSan integerChange the interestOps of the channel.

To see how an event is interpreted further, please refer to ChannelEvent.

Version:
$Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
The Netty Project, Trustin Lee

Enum Constant Summary
BOUND
          Represents a Channel's bound property
CONNECTED
          Represents a Channel's connected property
INTEREST_OPS
          Represents a Channel's interestOps property
OPEN
          Represents a Channel's open property
 
Method Summary
static ChannelState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ChannelState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OPEN

public static final ChannelState OPEN
Represents a Channel's open property


BOUND

public static final ChannelState BOUND
Represents a Channel's bound property


CONNECTED

public static final ChannelState CONNECTED
Represents a Channel's connected property


INTEREST_OPS

public static final ChannelState INTEREST_OPS
Represents a Channel's interestOps property

Method Detail

values

public static ChannelState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ChannelState c : ChannelState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ChannelState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.