public class DownstreamMessageEvent extends java.lang.Object implements MessageEvent
MessageEvent implementation.| Modifier and Type | Field and Description |
|---|---|
private Channel |
channel |
private ChannelFuture |
future |
private java.lang.Object |
message |
private java.net.SocketAddress |
remoteAddress |
| Constructor and Description |
|---|
DownstreamMessageEvent(Channel channel,
ChannelFuture future,
java.lang.Object message,
java.net.SocketAddress remoteAddress)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Channel |
getChannel()
Returns the
Channel which is associated with this event. |
ChannelFuture |
getFuture()
Returns the
ChannelFuture 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() |
private final Channel channel
private final ChannelFuture future
private final java.lang.Object message
private final java.net.SocketAddress remoteAddress
public DownstreamMessageEvent(Channel channel, ChannelFuture future, java.lang.Object message, java.net.SocketAddress remoteAddress)
public Channel getChannel()
ChannelEventChannel which is associated with this event.getChannel in interface ChannelEventpublic ChannelFuture getFuture()
ChannelEventChannelFuture 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.getFuture in interface ChannelEventpublic java.lang.Object getMessage()
MessageEventgetMessage in interface MessageEventpublic java.net.SocketAddress getRemoteAddress()
MessageEventgetRemoteAddress in interface MessageEventpublic java.lang.String toString()
toString in class java.lang.Object