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:
Trustin Lee 2009-02-11 09:56:28 +00:00
parent 2b5a00e8b8
commit 334ea6f6e6
3 changed files with 8 additions and 10 deletions

View File

@ -144,6 +144,8 @@ public class Channels {
// event factory methods
/**
* @deprecated Instantiate {@link UpstreamMessageEvent} or {@link DownstreamMessageEvent} directly instead.
*
* Creates a new {@link MessageEvent}
*
* @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
* 'sent' when the event is sent downstream)
*/
@Deprecated
public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message) {
return messageEvent(channel, future, message, null);
}
/**
* @deprecated Instantiate {@link UpstreamMessageEvent} or {@link DownstreamMessageEvent} directly instead.
*
* Creates a new {@link MessageEvent}
*
* @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
* 'destination' when the event is sent downstream)
*/
@Deprecated
public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message, SocketAddress remoteAddress) {
return new DownstreamMessageEvent(channel, future, message, remoteAddress);
}

View File

@ -27,11 +27,7 @@ import java.net.SocketAddress;
import org.jboss.netty.util.StringUtil;
/**
* The default {@link MessageEvent} implementation. It is recommended to
* 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.
* The default {@link MessageEvent} implementation.
*
* @author The Netty Project (netty-dev@lists.jboss.org)
* @author Trustin Lee (tlee@redhat.com)

View File

@ -29,11 +29,7 @@ import java.net.SocketAddress;
import org.jboss.netty.util.StringUtil;
/**
* The default {@link MessageEvent} implementation. It is recommended to
* 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.
* The default {@link MessageEvent} implementation.
*
* @author The Netty Project (netty-dev@lists.jboss.org)
* @author Trustin Lee (tlee@redhat.com)