|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.netty.channel.Channels
public class Channels
A helper class which provides various convenience methods related with
Channel
, ChannelHandler
, and ChannelPipeline
.
It is always recommended to use the factory methods provided by
Channels
rather than calling the constructor of the implementation
types.
pipeline()
pipeline(ChannelPipeline)
pipelineFactory(ChannelPipeline)
succeededFuture(Channel)
failedFuture(Channel, Throwable)
Various event generation methods are provided to simplify the generation of
upstream events and downstream events. It is always recommended to use the
event generation methods provided by Channels
rather than calling
ChannelHandlerContext.sendUpstream(ChannelEvent)
or
ChannelHandlerContext.sendDownstream(ChannelEvent)
by yourself.
Method Summary | |
---|---|
static void |
bind(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future,
SocketAddress localAddress)
Deprecated. Use bind(ChannelHandlerContext, ChannelFuture, SocketAddress) instead.
Sends a "bind" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
bind(ChannelHandlerContext ctx,
ChannelFuture future,
SocketAddress localAddress)
Sends a "bind" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static ChannelFuture |
bind(Channel channel,
SocketAddress localAddress)
Sends a "bind" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static ChannelFuture |
close(Channel channel)
Sends a "close" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
close(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future)
Deprecated. Use close(ChannelHandlerContext, ChannelFuture) instead.
Sends a "close" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
close(ChannelHandlerContext ctx,
ChannelFuture future)
Sends a "close" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
connect(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future,
SocketAddress remoteAddress)
Deprecated. Use connect(ChannelHandlerContext, ChannelFuture, SocketAddress) instead.
Sends a "connect" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
connect(ChannelHandlerContext ctx,
ChannelFuture future,
SocketAddress remoteAddress)
Sends a "connect" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static ChannelFuture |
connect(Channel channel,
SocketAddress remoteAddress)
Sends a "connect" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static ChannelFuture |
disconnect(Channel channel)
Sends a "disconnect" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
disconnect(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future)
Deprecated. Use disconnect(ChannelHandlerContext, ChannelFuture) instead.
Sends a "disconnect" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
disconnect(ChannelHandlerContext ctx,
ChannelFuture future)
Sends a "disconnect" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static ChannelFuture |
failedFuture(Channel channel,
Throwable cause)
Creates a new ChannelFuture which has failed already for the
specified Channel . |
static void |
fireChannelBound(ChannelHandlerContext ctx,
Channel channel,
SocketAddress localAddress)
Deprecated. Use fireChannelBound(ChannelHandlerContext, SocketAddress) instead.
Sends a "channelBound" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelBound(ChannelHandlerContext ctx,
SocketAddress localAddress)
Sends a "channelBound" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelBound(Channel channel,
SocketAddress localAddress)
Sends a "channelBound" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelClosed(Channel channel)
Sends a "channelClosed" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelClosed(ChannelHandlerContext ctx)
Sends a "channelClosed" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelClosed(ChannelHandlerContext ctx,
Channel channel)
Deprecated. Use fireChannelClosed(ChannelHandlerContext) .
Sends a "channelClosed" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelConnected(ChannelHandlerContext ctx,
Channel channel,
SocketAddress remoteAddress)
Deprecated. Use fireChannelConnected(ChannelHandlerContext, SocketAddress) instead.
Sends a "channelConnected" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelConnected(ChannelHandlerContext ctx,
SocketAddress remoteAddress)
Sends a "channelConnected" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelConnected(Channel channel,
SocketAddress remoteAddress)
Sends a "channelConnected" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelDisconnected(Channel channel)
Sends a "channelDisconnected" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelDisconnected(ChannelHandlerContext ctx)
Sends a "channelDisconnected" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelDisconnected(ChannelHandlerContext ctx,
Channel channel)
Deprecated. Use fireChannelDisconnected(ChannelHandlerContext) instead.
Sends a "channelDisconnected" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelInterestChanged(Channel channel)
Sends a "channelInterestChanged" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelInterestChanged(ChannelHandlerContext ctx)
Sends a "channelInterestChanged" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelInterestChanged(ChannelHandlerContext ctx,
Channel channel,
int interestOps)
Deprecated. Use fireChannelInterestChanged(ChannelHandlerContext) instead.
Sends a "channelInterestChanged" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelInterestChanged(Channel channel,
int interestOps)
Deprecated. Use fireChannelInterestChanged(Channel) instead.
Sends a "channelInterestChanged" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelOpen(Channel channel)
Sends a "channelOpen" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelOpen(ChannelHandlerContext ctx)
Sends a "channelOpen" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelOpen(ChannelHandlerContext ctx,
Channel channel)
Deprecated. Use fireChannelOpen(ChannelHandlerContext) instead.
Sends a "channelOpen" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext .
Please note that this method does not trigger a
|
static void |
fireChannelUnbound(Channel channel)
Sends a "channelUnbound" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireChannelUnbound(ChannelHandlerContext ctx)
Sends a "channelUnbound" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireChannelUnbound(ChannelHandlerContext ctx,
Channel channel)
Deprecated. Use fireChannelUnbound(ChannelHandlerContext) instead.
Sends a "channelUnbound" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireExceptionCaught(ChannelHandlerContext ctx,
Channel channel,
Throwable cause)
Deprecated. Use fireExceptionCaught(ChannelHandlerContext, Throwable) instead.
Sends a "exceptionCaught" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireExceptionCaught(ChannelHandlerContext ctx,
Throwable cause)
Sends a "exceptionCaught" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireExceptionCaught(Channel channel,
Throwable cause)
Sends a "exceptionCaught" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireMessageReceived(ChannelHandlerContext ctx,
Channel channel,
Object message)
Deprecated. Use fireMessageReceived(ChannelHandlerContext, Object) instead.
Sends a "messageReceived" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireMessageReceived(ChannelHandlerContext ctx,
Channel channel,
Object message,
SocketAddress remoteAddress)
Deprecated. Use fireMessageReceived(ChannelHandlerContext, Object, SocketAddress) instead.
Sends a "messageReceived" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireMessageReceived(ChannelHandlerContext ctx,
Object message)
Sends a "messageReceived" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireMessageReceived(ChannelHandlerContext ctx,
Object message,
SocketAddress remoteAddress)
Sends a "messageReceived" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireMessageReceived(Channel channel,
Object message)
Sends a "messageReceived" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
fireMessageReceived(Channel channel,
Object message,
SocketAddress remoteAddress)
Sends a "messageReceived" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel belongs. |
static void |
fireWriteComplete(ChannelHandlerContext ctx,
int amount)
Sends a "writeComplete" event to the
ChannelUpstreamHandler which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext . |
static void |
fireWriteComplete(Channel channel,
int amount)
Sends a "writeComplete" event to the first
ChannelUpstreamHandler in the ChannelPipeline of
the specified Channel . |
static ChannelFuture |
future(Channel channel)
Creates a new non-cancellable ChannelFuture for the specified
Channel . |
static ChannelFuture |
future(Channel channel,
boolean cancellable)
Creates a new ChannelFuture for the specified Channel . |
static MessageEvent |
messageEvent(Channel channel,
ChannelFuture future,
Object message)
Deprecated. Instantiate UpstreamMessageEvent or DownstreamMessageEvent directly instead.
Creates a new MessageEvent |
static MessageEvent |
messageEvent(Channel channel,
ChannelFuture future,
Object message,
SocketAddress remoteAddress)
Deprecated. Instantiate UpstreamMessageEvent or DownstreamMessageEvent directly instead.
Creates a new MessageEvent |
static ChannelPipeline |
pipeline()
Creates a new ChannelPipeline . |
static ChannelPipeline |
pipeline(ChannelPipeline pipeline)
Creates a new ChannelPipeline which contains the same entries
with the specified pipeline . |
static ChannelPipelineFactory |
pipelineFactory(ChannelPipeline pipeline)
Creates a new ChannelPipelineFactory which creates a new
ChannelPipeline which contains the same entries with the
specified pipeline . |
static void |
setInterestOps(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future,
int interestOps)
Deprecated. Use setInterestOps(ChannelHandlerContext, ChannelFuture, int) instead.
Sends a "setInterestOps" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
setInterestOps(ChannelHandlerContext ctx,
ChannelFuture future,
int interestOps)
Sends a "setInterestOps" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static ChannelFuture |
setInterestOps(Channel channel,
int interestOps)
Sends a "setInterestOps" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static ChannelFuture |
succeededFuture(Channel channel)
Creates a new ChannelFuture which is already succeeded for the
specified Channel . |
static ChannelFuture |
unbind(Channel channel)
Sends a "unbind" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static void |
unbind(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future)
Deprecated. Use unbind(ChannelHandlerContext, ChannelFuture) instead.
Sends a "unbind" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
unbind(ChannelHandlerContext ctx,
ChannelFuture future)
Sends a "unbind" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
write(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future,
Object message)
Deprecated. Use write(ChannelHandlerContext, ChannelFuture, Object) instead.
Sends a "write" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
write(ChannelHandlerContext ctx,
Channel channel,
ChannelFuture future,
Object message,
SocketAddress remoteAddress)
Deprecated. Use write(ChannelHandlerContext, ChannelFuture, Object, SocketAddress) instead.
Sends a "write" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
write(ChannelHandlerContext ctx,
ChannelFuture future,
Object message)
Sends a "write" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static void |
write(ChannelHandlerContext ctx,
ChannelFuture future,
Object message,
SocketAddress remoteAddress)
Sends a "write" request to the
ChannelDownstreamHandler which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext . |
static ChannelFuture |
write(Channel channel,
Object message)
Sends a "write" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
static ChannelFuture |
write(Channel channel,
Object message,
SocketAddress remoteAddress)
Sends a "write" request to the last
ChannelDownstreamHandler in the ChannelPipeline of
the specified Channel . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ChannelPipeline pipeline()
ChannelPipeline
.
public static ChannelPipeline pipeline(ChannelPipeline pipeline)
ChannelPipeline
which contains the same entries
with the specified pipeline
. Please note that only the names
and the references of the ChannelHandler
s will be copied; a new
ChannelHandler
instance will never be created.
public static ChannelPipelineFactory pipelineFactory(ChannelPipeline pipeline)
ChannelPipelineFactory
which creates a new
ChannelPipeline
which contains the same entries with the
specified pipeline
. Please note that only the names and the
references of the ChannelHandler
s will be copied; a new
ChannelHandler
instance will never be created.
public static ChannelFuture future(Channel channel)
ChannelFuture
for the specified
Channel
.
public static ChannelFuture future(Channel channel, boolean cancellable)
ChannelFuture
for the specified Channel
.
cancellable
- true
if and only if the returned future
can be canceled by ChannelFuture.cancel()
public static ChannelFuture succeededFuture(Channel channel)
ChannelFuture
which is already succeeded for the
specified Channel
.
public static ChannelFuture failedFuture(Channel channel, Throwable cause)
ChannelFuture
which has failed already for the
specified Channel
.
cause
- the cause of the failure@Deprecated public static MessageEvent messageEvent(Channel channel, ChannelFuture future, Object message)
UpstreamMessageEvent
or DownstreamMessageEvent
directly instead.
Creates a new MessageEvent
channel
- the channel which is associated with the eventfuture
- the future which will be notified when a message is sent
(only meaningful when the event is sent downstream)message
- the received or sent message object
('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, SocketAddress remoteAddress)
UpstreamMessageEvent
or DownstreamMessageEvent
directly instead.
Creates a new MessageEvent
channel
- the channel which is associated with the eventfuture
- the future which will be notified when a message is sent
(only meaningful when the event is sent downstream)message
- the received or sent message object
('received' when the event is sent upstream, and
'sent' when the event is sent downstream)remoteAddress
- the source or destination address of the message
('source' when the event is sent upstream, and
'destination' when the event is sent downstream)public static void fireChannelOpen(Channel channel)
"channelOpen"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
. If the specified channel has a parent,
a "childChannelOpen"
event will be sent, too.
public static void fireChannelOpen(ChannelHandlerContext ctx)
"channelOpen"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
Please note that this method does not trigger a
"childChannelOpen"
event unlike fireChannelOpen(Channel)
method.
@Deprecated public static void fireChannelOpen(ChannelHandlerContext ctx, Channel channel)
fireChannelOpen(ChannelHandlerContext)
instead.
Sends a "channelOpen"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
Please note that this method does not trigger a
"childChannelOpen"
event unlike fireChannelOpen(Channel)
method.
public static void fireChannelBound(Channel channel, SocketAddress localAddress)
"channelBound"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
localAddress
- the local address where the specified channel is boundpublic static void fireChannelBound(ChannelHandlerContext ctx, SocketAddress localAddress)
"channelBound"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
localAddress
- the local address where the specified channel is bound@Deprecated public static void fireChannelBound(ChannelHandlerContext ctx, Channel channel, SocketAddress localAddress)
fireChannelBound(ChannelHandlerContext, SocketAddress)
instead.
Sends a "channelBound"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
localAddress
- the local address where the specified channel is boundpublic static void fireChannelConnected(Channel channel, SocketAddress remoteAddress)
"channelConnected"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
remoteAddress
- the remote address where the specified channel is connectedpublic static void fireChannelConnected(ChannelHandlerContext ctx, SocketAddress remoteAddress)
"channelConnected"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
remoteAddress
- the remote address where the specified channel is connected@Deprecated public static void fireChannelConnected(ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress)
fireChannelConnected(ChannelHandlerContext, SocketAddress)
instead.
Sends a "channelConnected"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
remoteAddress
- the remote address where the specified channel is connectedpublic static void fireMessageReceived(Channel channel, Object message)
"messageReceived"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
message
- the received messagepublic static void fireMessageReceived(Channel channel, Object message, SocketAddress remoteAddress)
"messageReceived"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
belongs.
message
- the received messageremoteAddress
- the remote address where the received message
came frompublic static void fireMessageReceived(ChannelHandlerContext ctx, Object message)
"messageReceived"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
message
- the received message@Deprecated public static void fireMessageReceived(ChannelHandlerContext ctx, Channel channel, Object message)
fireMessageReceived(ChannelHandlerContext, Object)
instead.
Sends a "messageReceived"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
message
- the received messagepublic static void fireMessageReceived(ChannelHandlerContext ctx, Object message, SocketAddress remoteAddress)
"messageReceived"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
message
- the received messageremoteAddress
- the remote address where the received message
came from@Deprecated public static void fireMessageReceived(ChannelHandlerContext ctx, Channel channel, Object message, SocketAddress remoteAddress)
fireMessageReceived(ChannelHandlerContext, Object, SocketAddress)
instead.
Sends a "messageReceived"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
message
- the received messageremoteAddress
- the remote address where the received message
came frompublic static void fireWriteComplete(Channel channel, int amount)
"writeComplete"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
public static void fireWriteComplete(ChannelHandlerContext ctx, int amount)
"writeComplete"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
public static void fireChannelInterestChanged(Channel channel)
"channelInterestChanged"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
@Deprecated public static void fireChannelInterestChanged(Channel channel, int interestOps)
fireChannelInterestChanged(Channel)
instead.
Sends a "channelInterestChanged"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
interestOps
- the new interestOpspublic static void fireChannelInterestChanged(ChannelHandlerContext ctx)
"channelInterestChanged"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
@Deprecated public static void fireChannelInterestChanged(ChannelHandlerContext ctx, Channel channel, int interestOps)
fireChannelInterestChanged(ChannelHandlerContext)
instead.
Sends a "channelInterestChanged"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
channel
- the Channel
interestOps
- the new interestOpspublic static void fireChannelDisconnected(Channel channel)
"channelDisconnected"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
public static void fireChannelDisconnected(ChannelHandlerContext ctx)
"channelDisconnected"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
@Deprecated public static void fireChannelDisconnected(ChannelHandlerContext ctx, Channel channel)
fireChannelDisconnected(ChannelHandlerContext)
instead.
Sends a "channelDisconnected"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
public static void fireChannelUnbound(Channel channel)
"channelUnbound"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
public static void fireChannelUnbound(ChannelHandlerContext ctx)
"channelUnbound"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
@Deprecated public static void fireChannelUnbound(ChannelHandlerContext ctx, Channel channel)
fireChannelUnbound(ChannelHandlerContext)
instead.
Sends a "channelUnbound"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
public static void fireChannelClosed(Channel channel)
"channelClosed"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
public static void fireChannelClosed(ChannelHandlerContext ctx)
"channelClosed"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
@Deprecated public static void fireChannelClosed(ChannelHandlerContext ctx, Channel channel)
fireChannelClosed(ChannelHandlerContext)
.
Sends a "channelClosed"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
public static void fireExceptionCaught(Channel channel, Throwable cause)
"exceptionCaught"
event to the first
ChannelUpstreamHandler
in the ChannelPipeline
of
the specified Channel
.
public static void fireExceptionCaught(ChannelHandlerContext ctx, Throwable cause)
"exceptionCaught"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
@Deprecated public static void fireExceptionCaught(ChannelHandlerContext ctx, Channel channel, Throwable cause)
fireExceptionCaught(ChannelHandlerContext, Throwable)
instead.
Sends a "exceptionCaught"
event to the
ChannelUpstreamHandler
which is placed in the closest upstream
from the handler associated with the specified
ChannelHandlerContext
.
public static ChannelFuture bind(Channel channel, SocketAddress localAddress)
"bind"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to bindlocalAddress
- the local address to bind to
ChannelFuture
which will be notified when the
bind operation is donepublic static void bind(ChannelHandlerContext ctx, ChannelFuture future, SocketAddress localAddress)
"bind"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified when the bind
operation is donelocalAddress
- the local address to bind to@Deprecated public static void bind(ChannelHandlerContext ctx, Channel channel, ChannelFuture future, SocketAddress localAddress)
bind(ChannelHandlerContext, ChannelFuture, SocketAddress)
instead.
Sends a "bind"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to bindfuture
- the future which will be notified when the bind
operation is donelocalAddress
- the local address to bind topublic static void unbind(ChannelHandlerContext ctx, ChannelFuture future)
"unbind"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified when the unbind
operation is done@Deprecated public static void unbind(ChannelHandlerContext ctx, Channel channel, ChannelFuture future)
unbind(ChannelHandlerContext, ChannelFuture)
instead.
Sends a "unbind"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to unbindfuture
- the future which will be notified when the unbind
operation is donepublic static ChannelFuture unbind(Channel channel)
"unbind"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to unbind
ChannelFuture
which will be notified when the
unbind operation is donepublic static ChannelFuture connect(Channel channel, SocketAddress remoteAddress)
"connect"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to attempt a connectionremoteAddress
- the remote address to connect to
ChannelFuture
which will be notified when the
connection attempt is donepublic static void connect(ChannelHandlerContext ctx, ChannelFuture future, SocketAddress remoteAddress)
"connect"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified when the connection
attempt is doneremoteAddress
- the remote address to connect to@Deprecated public static void connect(ChannelHandlerContext ctx, Channel channel, ChannelFuture future, SocketAddress remoteAddress)
connect(ChannelHandlerContext, ChannelFuture, SocketAddress)
instead.
Sends a "connect"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to attempt a connectionfuture
- the future which will be notified when the connection
attempt is doneremoteAddress
- the remote address to connect topublic static ChannelFuture write(Channel channel, Object message)
"write"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to write a messagemessage
- the message to write to the channel
ChannelFuture
which will be notified when the
write operation is donepublic static void write(ChannelHandlerContext ctx, ChannelFuture future, Object message)
"write"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified when the write
operation is done@Deprecated public static void write(ChannelHandlerContext ctx, Channel channel, ChannelFuture future, Object message)
write(ChannelHandlerContext, ChannelFuture, Object)
instead.
Sends a "write"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to write a messagefuture
- the future which will be notified when the write
operation is donepublic static ChannelFuture write(Channel channel, Object message, SocketAddress remoteAddress)
"write"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to write a messagemessage
- the message to write to the channelremoteAddress
- the destination of the message.
null
to use the default remote address
ChannelFuture
which will be notified when the
write operation is donepublic static void write(ChannelHandlerContext ctx, ChannelFuture future, Object message, SocketAddress remoteAddress)
"write"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified when the write
operation is donemessage
- the message to write to the channelremoteAddress
- the destination of the message.
null
to use the default remote address.@Deprecated public static void write(ChannelHandlerContext ctx, Channel channel, ChannelFuture future, Object message, SocketAddress remoteAddress)
write(ChannelHandlerContext, ChannelFuture, Object, SocketAddress)
instead.
Sends a "write"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to write a messagefuture
- the future which will be notified when the write
operation is donemessage
- the message to write to the channelremoteAddress
- the destination of the message.
null
to use the default remote address.public static ChannelFuture setInterestOps(Channel channel, int interestOps)
"setInterestOps"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to change its interestOpsinterestOps
- the new interestOps
ChannelFuture
which will be notified when the
interestOps is changedpublic static void setInterestOps(ChannelHandlerContext ctx, ChannelFuture future, int interestOps)
"setInterestOps"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified when the interestOps is
changed.@Deprecated public static void setInterestOps(ChannelHandlerContext ctx, Channel channel, ChannelFuture future, int interestOps)
setInterestOps(ChannelHandlerContext, ChannelFuture, int)
instead.
Sends a "setInterestOps"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to change the interestOpsfuture
- the future which will be notified when the interestOps is
changed.public static ChannelFuture disconnect(Channel channel)
"disconnect"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to disconnect
ChannelFuture
which will be notified on disconnectionpublic static void disconnect(ChannelHandlerContext ctx, ChannelFuture future)
"disconnect"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified on disconnection@Deprecated public static void disconnect(ChannelHandlerContext ctx, Channel channel, ChannelFuture future)
disconnect(ChannelHandlerContext, ChannelFuture)
instead.
Sends a "disconnect"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to disconnectfuture
- the future which will be notified on disconnectionpublic static ChannelFuture close(Channel channel)
"close"
request to the last
ChannelDownstreamHandler
in the ChannelPipeline
of
the specified Channel
.
channel
- the channel to close
ChannelFuture
which will be notified on closurepublic static void close(ChannelHandlerContext ctx, ChannelFuture future)
"close"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextfuture
- the future which will be notified on closure@Deprecated public static void close(ChannelHandlerContext ctx, Channel channel, ChannelFuture future)
close(ChannelHandlerContext, ChannelFuture)
instead.
Sends a "close"
request to the
ChannelDownstreamHandler
which is placed in the closest
downstream from the handler associated with the specified
ChannelHandlerContext
.
ctx
- the contextchannel
- the channel to closefuture
- the future which will be notified on closure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |