Package org.jboss.netty.channel
Enum ChannelState
- java.lang.Object
-
- java.lang.Enum<ChannelState>
-
- org.jboss.netty.channel.ChannelState
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ChannelState>
public enum ChannelState extends java.lang.Enum<ChannelState>
The current or future state of aChannel.The state of a
Channelis interpreted differently depending on the value of aChannelStateEventand the direction of the event in aChannelPipeline:Direction State Value Meaning Upstream OPENtrueThe channel is open. Upstream OPENfalseThe channel is closed. Upstream BOUNDSocketAddressThe channel is bound to a local address. Upstream BOUNDnullThe channel is unbound to a local address. Upstream CONNECTEDSocketAddressThe channel is connected to a remote address. Upstream CONNECTEDnullThe channel is disconnected from a remote address. Upstream INTEREST_OPSan integer The channel interestOps has been changed. Downstream OPENtrueN/A Downstream OPENfalseClose the channel. Downstream BOUNDSocketAddressBind the channel to the specified local address. Downstream BOUNDnullUnbind the channel from the current local address. Downstream CONNECTEDSocketAddressConnect the channel to the specified remote address. Downstream CONNECTEDnullDisconnect the channel from the current remote address. Downstream INTEREST_OPSan integer Change the interestOps of the channel. To see how an event is interpreted further, please refer to
ChannelEvent.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOUNDCONNECTEDINTEREST_OPSRepresents aChannel'sinterestOpspropertyOPEN
-
Constructor Summary
Constructors Modifier Constructor Description privateChannelState()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChannelStatevalueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
OPEN
public static final ChannelState OPEN
-
BOUND
public static final ChannelState BOUND
-
CONNECTED
public static final ChannelState CONNECTED
-
INTEREST_OPS
public static final ChannelState INTEREST_OPS
Represents aChannel'sinterestOpsproperty
-
-
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(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-