码迷,mamicode.com
首页 > Web开发 > 详细

Netty3 源码分析 - ChannelState

时间:2014-09-10 17:54:40      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:channelstate   channelstateevent   

Netty3 源码分析 - ChannelState


枚举类ChannelState代表的是这个Channel的状态集,状态的解读和ChannelStateEvent中的value值以及事件的方向息息相关,下面这个表可以从宏观上把握。

Direction

State

Value

Meaning

Upstream

OPEN

true

The channel is open.

Upstream

OPEN

false

The channel is closed.

Upstream

BOUND

SocketAddress

The channel is bound to a local address.

Upstream

BOUND

null

The channel is unbound to a local address.

Upstream

CONNECTED

SocketAddress

The channel is connected to a remote address.

Upstream

CONNECTED

null

The channel is disconnected from a remote address.

Upstream

INTEREST_OPS

an integer

The channel interestOps has been changed.

Downstream

OPEN

true

N/A(因为通道创建的时候就打开了)

Downstream

OPEN

false

Close the channel.

Downstream

BOUND

SocketAddress

Bind the channel to the specified local address.

Downstream

BOUND

null

Unbind the channel from the current local address.

Downstream

CONNECTED

SocketAddress

Connect the channel to the specified remote address.

Downstream

CONNECTED

null

Disconnect the channel from the current remote address.

Downstream

INTEREST_OPS

an integer

Change the interestOps of the channel.



Netty3 源码分析 - ChannelState

标签:channelstate   channelstateevent   

原文地址:http://blog.csdn.net/vonzhoufz/article/details/39182249

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!