Top Description Inners Fields Constructors Methods
io.netty.channel

public Class CombinedChannelDuplexHandler<I extends ChannelInboundHandler, O extends ChannelOutboundHandler>

extends ChannelDuplexHandler
Class Inheritance
Imports
io.netty.buffer.ByteBufAllocator, io.netty.util.Attribute, .AttributeKey, io.netty.util.concurrent.EventExecutor, io.netty.util.internal.ObjectUtil, .ThrowableUtil, io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.net.SocketAddress

Combines a ChannelInboundHandler and a ChannelOutboundHandler into one ChannelHandler.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private volatile boolean
private CombinedChannelDuplexHandler.DelegatingChannelHandlerContext
private I
private static final InternalLogger
private CombinedChannelDuplexHandler.DelegatingChannelHandlerContext
private O

Constructor Summary

AccessConstructor and Description
protected
CombinedChannelDuplexHandler()

Creates a new uninitialized instance.

public
CombinedChannelDuplexHandler(I inboundHandler, O outboundHandler)

Creates a new instance that combines the specified two handlers into one.

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
)

Overrides io.netty.channel.ChannelDuplexHandler.bind.

Implements io.netty.channel.ChannelOutboundHandler.bind.

Calls ChannelHandlerContext#bind(SocketAddress, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.
public void
public void
public void
public void
public void
public void
public void
private void
public void
close(ChannelHandlerContext
the ChannelHandlerContext for which the close operation is made
ctx
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Overrides io.netty.channel.ChannelDuplexHandler.close.

Implements io.netty.channel.ChannelOutboundHandler.close.

Calls ChannelHandlerContext#close(ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.
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
)

Overrides io.netty.channel.ChannelDuplexHandler.connect.

Implements io.netty.channel.ChannelOutboundHandler.connect.

Calls ChannelHandlerContext#connect(SocketAddress, SocketAddress, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.
public void
public void
public void
public void
public void
handlerAdded(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelHandlerAdapter.handlerAdded.

Implements io.netty.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.
public void
handlerRemoved(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelHandlerAdapter.handlerRemoved.

Implements io.netty.channel.ChannelHandler.handlerRemoved.

Gets called after the ChannelHandler was removed from the actual context and it doesn't handle events anymore.
protected final I
protected final void
init(I inboundHandler, O outboundHandler)

Initialized this handler with the specified handlers.

protected final O
public void
public final void
public final void
public void
private void
validate(I inboundHandler, O outboundHandler)

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
)

Overrides io.netty.channel.ChannelDuplexHandler.write.

Implements io.netty.channel.ChannelOutboundHandler.write.

Calls ChannelHandlerContext#write(Object, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.