org.jboss.netty.channel
Class DownstreamChannelStateEvent

java.lang.Object
  extended by org.jboss.netty.channel.DownstreamChannelStateEvent
All Implemented Interfaces:
ChannelEvent, ChannelStateEvent

public class DownstreamChannelStateEvent
extends Object
implements ChannelStateEvent

The default downstream ChannelStateEvent implementation.

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

Constructor Summary
DownstreamChannelStateEvent(Channel channel, ChannelFuture future, ChannelState state, Object value)
          Creates a new instance.
 
Method Summary
 Channel getChannel()
          Returns the Channel which is associated with this event.
 ChannelFuture getFuture()
          Returns the ChannelFuture which is associated with this event.
 ChannelState getState()
          Returns the changed property of the Channel.
 Object getValue()
          Returns the value of the changed property of the Channel.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DownstreamChannelStateEvent

public DownstreamChannelStateEvent(Channel channel,
                                   ChannelFuture future,
                                   ChannelState state,
                                   Object value)
Creates a new instance.

Method Detail

getChannel

public Channel getChannel()
Description copied from interface: ChannelEvent
Returns the Channel which is associated with this event.

Specified by:
getChannel in interface ChannelEvent

getFuture

public ChannelFuture getFuture()
Description copied from interface: ChannelEvent
Returns the ChannelFuture which is associated with this event. If this event is an upstream event, this method will always return a SucceededChannelFuture because the event has occurred already. If this event is a downstream event (i.e. I/O request), the returned future will be notified when the I/O request succeeds or fails.

Specified by:
getFuture in interface ChannelEvent

getState

public ChannelState getState()
Description copied from interface: ChannelStateEvent
Returns the changed property of the Channel.

Specified by:
getState in interface ChannelStateEvent

getValue

public Object getValue()
Description copied from interface: ChannelStateEvent
Returns the value of the changed property of the Channel. Please refer to ChannelState documentation to find out the allowed values for each property.

Specified by:
getValue in interface ChannelStateEvent

toString

public String toString()
Overrides:
toString in class Object


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