Package org.jboss.netty.channel
Class DownstreamMessageEvent
- java.lang.Object
-
- org.jboss.netty.channel.DownstreamMessageEvent
-
- All Implemented Interfaces:
ChannelEvent,MessageEvent
public class DownstreamMessageEvent extends java.lang.Object implements MessageEvent
The default downstreamMessageEventimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description private Channelchannelprivate ChannelFuturefutureprivate java.lang.Objectmessageprivate java.net.SocketAddressremoteAddress
-
Constructor Summary
Constructors Constructor Description DownstreamMessageEvent(Channel channel, ChannelFuture future, java.lang.Object message, java.net.SocketAddress remoteAddress)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelgetChannel()Returns theChannelwhich is associated with this event.ChannelFuturegetFuture()Returns theChannelFuturewhich is associated with this event.java.lang.ObjectgetMessage()Returns the message.java.net.SocketAddressgetRemoteAddress()Returns the remote address of the message.java.lang.StringtoString()
-
-
-
Field Detail
-
channel
private final Channel channel
-
future
private final ChannelFuture future
-
message
private final java.lang.Object message
-
remoteAddress
private final java.net.SocketAddress remoteAddress
-
-
Constructor Detail
-
DownstreamMessageEvent
public DownstreamMessageEvent(Channel channel, ChannelFuture future, java.lang.Object message, java.net.SocketAddress remoteAddress)
Creates a new instance.
-
-
Method Detail
-
getChannel
public Channel getChannel()
Description copied from interface:ChannelEventReturns theChannelwhich is associated with this event.- Specified by:
getChannelin interfaceChannelEvent
-
getFuture
public ChannelFuture getFuture()
Description copied from interface:ChannelEventReturns theChannelFuturewhich is associated with this event. If this event is an upstream event, this method will always return aSucceededChannelFuturebecause 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:
getFuturein interfaceChannelEvent
-
getMessage
public java.lang.Object getMessage()
Description copied from interface:MessageEventReturns the message.- Specified by:
getMessagein interfaceMessageEvent
-
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
Description copied from interface:MessageEventReturns the remote address of the message.- Specified by:
getRemoteAddressin interfaceMessageEvent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-