public interface ChannelOutboundHandler extends ChannelHandler
ChannelHandler
which will get notified for IO-outbound-operations.ChannelHandler.Sharable
Modifier and Type | Method and Description |
---|---|
void |
bind(ChannelHandlerContext ctx,
SocketAddress localAddress,
ChannelPromise promise)
Called once a bind operation is made.
|
void |
close(ChannelHandlerContext ctx,
ChannelPromise promise)
Called once a close operation is made.
|
void |
connect(ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
ChannelPromise promise)
Called once a connect operation is made.
|
void |
deregister(ChannelHandlerContext ctx,
ChannelPromise promise)
Called once a deregister operation is made from the current registered
EventLoop . |
void |
disconnect(ChannelHandlerContext ctx,
ChannelPromise promise)
Called once a disconnect operation is made.
|
void |
flush(ChannelHandlerContext ctx)
Called once a flush operation is made.
|
void |
read(ChannelHandlerContext ctx)
Intercepts
ChannelHandlerContext.read() . |
void |
write(ChannelHandlerContext ctx,
Object msg,
ChannelPromise promise)
Called once a write operation is made.
|
exceptionCaught, handlerAdded, handlerRemoved
void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception
ctx
- the ChannelHandlerContext
for which the bind operation is madelocalAddress
- the SocketAddress
to which it should boundpromise
- the ChannelPromise
to notify once the operation completesException
- thrown if an error occursvoid connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception
ctx
- the ChannelHandlerContext
for which the connect operation is maderemoteAddress
- the SocketAddress
to which it should connectlocalAddress
- the SocketAddress
which is used as source on connectpromise
- the ChannelPromise
to notify once the operation completesException
- thrown if an error occursvoid disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
ctx
- the ChannelHandlerContext
for which the disconnect operation is madepromise
- the ChannelPromise
to notify once the operation completesException
- thrown if an error occursvoid close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
ctx
- the ChannelHandlerContext
for which the close operation is madepromise
- the ChannelPromise
to notify once the operation completesException
- thrown if an error occursvoid deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
EventLoop
.ctx
- the ChannelHandlerContext
for which the close operation is madepromise
- the ChannelPromise
to notify once the operation completesException
- thrown if an error occursvoid read(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.read()
.Exception
void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception
ChannelPipeline
. Those are then ready to be flushed to the actual Channel
once
Channel.flush()
is calledctx
- the ChannelHandlerContext
for which the write operation is mademsg
- the message to writepromise
- the ChannelPromise
to notify once the operation completesException
- thrown if an error occursvoid flush(ChannelHandlerContext ctx) throws Exception
ctx
- the ChannelHandlerContext
for which the flush operation is madeException
- thrown if an error occursCopyright © 2008–2024 The Netty Project. All rights reserved.