Package org.jboss.netty.channel
Class UpstreamMessageEvent
- java.lang.Object
-
- org.jboss.netty.channel.UpstreamMessageEvent
-
- All Implemented Interfaces:
ChannelEvent
,MessageEvent
public class UpstreamMessageEvent extends java.lang.Object implements MessageEvent
The default upstreamMessageEvent
implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private Channel
channel
private java.lang.Object
message
private java.net.SocketAddress
remoteAddress
-
Constructor Summary
Constructors Constructor Description UpstreamMessageEvent(Channel channel, 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 Channel
getChannel()
Returns theChannel
which is associated with this event.ChannelFuture
getFuture()
Returns theChannelFuture
which is associated with this event.java.lang.Object
getMessage()
Returns the message.java.net.SocketAddress
getRemoteAddress()
Returns the remote address of the message.java.lang.String
toString()
-
-
-
Field Detail
-
channel
private final Channel channel
-
message
private final java.lang.Object message
-
remoteAddress
private final java.net.SocketAddress remoteAddress
-
-
Constructor Detail
-
UpstreamMessageEvent
public UpstreamMessageEvent(Channel channel, java.lang.Object message, java.net.SocketAddress remoteAddress)
Creates a new instance.
-
-
Method Detail
-
getChannel
public Channel getChannel()
Description copied from interface:ChannelEvent
Returns theChannel
which is associated with this event.- Specified by:
getChannel
in interfaceChannelEvent
-
getFuture
public ChannelFuture getFuture()
Description copied from interface:ChannelEvent
Returns theChannelFuture
which is associated with this event. If this event is an upstream event, this method will always return aSucceededChannelFuture
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 interfaceChannelEvent
-
getMessage
public java.lang.Object getMessage()
Description copied from interface:MessageEvent
Returns the message.- Specified by:
getMessage
in interfaceMessageEvent
-
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
Description copied from interface:MessageEvent
Returns the remote address of the message.- Specified by:
getRemoteAddress
in interfaceMessageEvent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-