Now that there are two MessageEvent implementation, there's no point of having Channels.messageEvent() - a user could just create a new instance by calling the respective implementation's constructor
This commit is contained in:
parent
2b5a00e8b8
commit
334ea6f6e6
@ -144,6 +144,8 @@ public class Channels {
|
|||||||
// event factory methods
|
// event factory methods
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Instantiate {@link UpstreamMessageEvent} or {@link DownstreamMessageEvent} directly instead.
|
||||||
|
*
|
||||||
* Creates a new {@link MessageEvent}
|
* Creates a new {@link MessageEvent}
|
||||||
*
|
*
|
||||||
* @param channel the channel which is associated with the event
|
* @param channel the channel which is associated with the event
|
||||||
@ -153,11 +155,14 @@ public class Channels {
|
|||||||
* ('received' when the event is sent upstream, and
|
* ('received' when the event is sent upstream, and
|
||||||
* 'sent' when the event is sent downstream)
|
* 'sent' when the event is sent downstream)
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message) {
|
public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message) {
|
||||||
return messageEvent(channel, future, message, null);
|
return messageEvent(channel, future, message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Instantiate {@link UpstreamMessageEvent} or {@link DownstreamMessageEvent} directly instead.
|
||||||
|
*
|
||||||
* Creates a new {@link MessageEvent}
|
* Creates a new {@link MessageEvent}
|
||||||
*
|
*
|
||||||
* @param channel the channel which is associated with the event
|
* @param channel the channel which is associated with the event
|
||||||
@ -170,6 +175,7 @@ public class Channels {
|
|||||||
* ('source' when the event is sent upstream, and
|
* ('source' when the event is sent upstream, and
|
||||||
* 'destination' when the event is sent downstream)
|
* 'destination' when the event is sent downstream)
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message, SocketAddress remoteAddress) {
|
public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message, SocketAddress remoteAddress) {
|
||||||
return new DownstreamMessageEvent(channel, future, message, remoteAddress);
|
return new DownstreamMessageEvent(channel, future, message, remoteAddress);
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,7 @@ import java.net.SocketAddress;
|
|||||||
import org.jboss.netty.util.StringUtil;
|
import org.jboss.netty.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link MessageEvent} implementation. It is recommended to
|
* The default {@link MessageEvent} implementation.
|
||||||
* use {@link Channels#messageEvent(Channel, ChannelFuture, Object)} and
|
|
||||||
* {@link Channels#messageEvent(Channel, ChannelFuture, Object, SocketAddress)}
|
|
||||||
* to create a new {@link MessageEvent} instance rather than calling the
|
|
||||||
* constructor explicitly.
|
|
||||||
*
|
*
|
||||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||||
* @author Trustin Lee (tlee@redhat.com)
|
* @author Trustin Lee (tlee@redhat.com)
|
||||||
|
@ -29,11 +29,7 @@ import java.net.SocketAddress;
|
|||||||
import org.jboss.netty.util.StringUtil;
|
import org.jboss.netty.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link MessageEvent} implementation. It is recommended to
|
* The default {@link MessageEvent} implementation.
|
||||||
* use {@link Channels#messageEvent(Channel, ChannelFuture, Object)} and
|
|
||||||
* {@link Channels#messageEvent(Channel, ChannelFuture, Object, SocketAddress)}
|
|
||||||
* to create a new {@link MessageEvent} instance rather than calling the
|
|
||||||
* constructor explicitly.
|
|
||||||
*
|
*
|
||||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||||
* @author Trustin Lee (tlee@redhat.com)
|
* @author Trustin Lee (tlee@redhat.com)
|
||||||
|
Loading…
Reference in New Issue
Block a user