Top Description Methods
io.netty.channel

public Interface ChannelOutboundHandler

extends ChannelHandler
Known Direct Implementers
io.netty.channel.ChannelOutboundHandlerAdapter, io.netty.channel.ChannelDuplexHandler, io.netty.channel.DefaultChannelPipeline.HeadContext
Imports
java.net.SocketAddress

ChannelHandler which will get notified for IO-outbound-operations.

Method Summary

Modifier and TypeMethod and Description
public void
bind(ChannelHandlerContext
the ChannelHandlerContext for which the bind operation is made
ctx
,
SocketAddress
the SocketAddress to which it should bound
localAddress
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Called once a bind operation is made.

public void
close(ChannelHandlerContext
the ChannelHandlerContext for which the close operation is made
ctx
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Called once a close operation is made.

public void
connect(ChannelHandlerContext
the ChannelHandlerContext for which the connect operation is made
ctx
,
SocketAddress
the SocketAddress to which it should connect
remoteAddress
,
SocketAddress
the SocketAddress which is used as source on connect
localAddress
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Called once a connect operation is made.

public void
deregister(ChannelHandlerContext
the ChannelHandlerContext for which the close operation is made
ctx
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Called once a deregister operation is made from the current registered EventLoop.

public void
disconnect(ChannelHandlerContext
the ChannelHandlerContext for which the disconnect operation is made
ctx
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Called once a disconnect operation is made.

public void
flush(ChannelHandlerContext
the ChannelHandlerContext for which the flush operation is made
ctx
)

Called once a flush operation is made.

public void
public void
write(ChannelHandlerContext
the ChannelHandlerContext for which the write operation is made
ctx
,
Object
the message to write
msg
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Called once a write operation is made.

Inherited from io.netty.channel.ChannelHandler:
exceptionCaughthandlerAddedhandlerRemoved

Method Detail

bindback to summary
public void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception

Called once a bind operation is made.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the bind operation is made

localAddress:SocketAddress

the SocketAddress to which it should bound

promise:ChannelPromise

the ChannelPromise to notify once the operation completes

Exceptions
Exception:
thrown if an error occurs
closeback to summary
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception

Called once a close operation is made.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the close operation is made

promise:ChannelPromise

the ChannelPromise to notify once the operation completes

Exceptions
Exception:
thrown if an error occurs
connectback to summary
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception

Called once a connect operation is made.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the connect operation is made

remoteAddress:SocketAddress

the SocketAddress to which it should connect

localAddress:SocketAddress

the SocketAddress which is used as source on connect

promise:ChannelPromise

the ChannelPromise to notify once the operation completes

Exceptions
Exception:
thrown if an error occurs
deregisterback to summary
public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception

Called once a deregister operation is made from the current registered EventLoop.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the close operation is made

promise:ChannelPromise

the ChannelPromise to notify once the operation completes

Exceptions
Exception:
thrown if an error occurs
disconnectback to summary
public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception

Called once a disconnect operation is made.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the disconnect operation is made

promise:ChannelPromise

the ChannelPromise to notify once the operation completes

Exceptions
Exception:
thrown if an error occurs
flushback to summary
public void flush(ChannelHandlerContext ctx) throws Exception

Called once a flush operation is made. The flush operation will try to flush out all previous written messages that are pending.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the flush operation is made

Exceptions
Exception:
thrown if an error occurs
readback to summary
public void read(ChannelHandlerContext ctx) throws Exception

Intercepts ChannelHandlerContext#read().

writeback to summary
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception

Called once a write operation is made. The write operation will write the messages through the ChannelPipeline. Those are then ready to be flushed to the actual Channel once Channel#flush() is called

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the write operation is made

msg:Object

the message to write

promise:ChannelPromise

the ChannelPromise to notify once the operation completes

Exceptions
Exception:
thrown if an error occurs