public final class RntbdRequestManager extends Object implements io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler
| Constructor and Description |
|---|
RntbdRequestManager(io.netty.channel.pool.ChannelHealthChecker healthChecker,
int pendingRequestLimit) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(io.netty.channel.ChannelHandlerContext context,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
Called once a bind operation is made.
|
void |
channelActive(io.netty.channel.ChannelHandlerContext context)
The
Channel of the ChannelHandlerContext is now active |
void |
channelInactive(io.netty.channel.ChannelHandlerContext context)
The
Channel of the ChannelHandlerContext was registered and has reached the end of its lifetime |
void |
channelRead(io.netty.channel.ChannelHandlerContext context,
Object message)
The
Channel of the ChannelHandlerContext has read a message from its peer. |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext context)
The
Channel of the ChannelHandlerContext has fully consumed the most-recent message read. |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext context)
Constructs a
CoalescingBufferQueue for buffering encoded requests until we have an RntbdRequest |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext context)
The
Channel of the ChannelHandlerContext was unregistered from its EventLoop |
void |
channelWritabilityChanged(io.netty.channel.ChannelHandlerContext context)
Gets called once the writable state of a
Channel changed. |
void |
close(io.netty.channel.ChannelHandlerContext context,
io.netty.channel.ChannelPromise promise)
Called once a close operation is made.
|
void |
connect(io.netty.channel.ChannelHandlerContext context,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
Called once a connect operation is made.
|
void |
deregister(io.netty.channel.ChannelHandlerContext context,
io.netty.channel.ChannelPromise promise)
Called once a deregister operation is made from the current registered
EventLoop. |
void |
disconnect(io.netty.channel.ChannelHandlerContext context,
io.netty.channel.ChannelPromise promise)
Called once a disconnect operation is made.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext context,
Throwable cause)
Processes
ChannelHandlerContext.fireExceptionCaught(Throwable) in the ChannelPipeline |
void |
flush(io.netty.channel.ChannelHandlerContext context)
Called once a flush operation is made
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext context)
Gets called after the
ChannelHandler was added to the actual context and it's ready to handle events. |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext context)
Gets called after the
ChannelHandler was removed from the actual context and it doesn't handle events
anymore. |
void |
read(io.netty.channel.ChannelHandlerContext context)
Intercepts
ChannelHandlerContext.read() |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext context,
Object event)
Processes inbound events triggered by channel handlers in the
RntbdClientChannelHandler pipeline |
void |
write(io.netty.channel.ChannelHandlerContext context,
Object message,
io.netty.channel.ChannelPromise promise)
Called once a write operation is made
|
public RntbdRequestManager(io.netty.channel.pool.ChannelHealthChecker healthChecker,
int pendingRequestLimit)
public void handlerAdded(io.netty.channel.ChannelHandlerContext context)
ChannelHandler was added to the actual context and it's ready to handle events.handlerAdded in interface io.netty.channel.ChannelHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void handlerRemoved(io.netty.channel.ChannelHandlerContext context)
ChannelHandler was removed from the actual context and it doesn't handle events
anymore.handlerRemoved in interface io.netty.channel.ChannelHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void channelActive(io.netty.channel.ChannelHandlerContext context)
Channel of the ChannelHandlerContext is now activechannelActive in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void channelInactive(io.netty.channel.ChannelHandlerContext context)
Channel of the ChannelHandlerContext was registered and has reached the end of its lifetime
This method will only be called after the channel is closed.
channelInactive in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void channelRead(io.netty.channel.ChannelHandlerContext context,
Object message)
Channel of the ChannelHandlerContext has read a message from its peer.channelRead in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongs.message - The message read.public void channelReadComplete(io.netty.channel.ChannelHandlerContext context)
Channel of the ChannelHandlerContext has fully consumed the most-recent message read.
If ChannelOption.AUTO_READ is off, no further attempt to read inbound data from the current
Channel will be made until ChannelHandlerContext.read() is called. This leaves time
for outbound messages to be written.
channelReadComplete in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void channelRegistered(io.netty.channel.ChannelHandlerContext context)
CoalescingBufferQueue for buffering encoded requests until we have an RntbdRequest
This method then calls ChannelHandlerContext.fireChannelRegistered() to forward to the next
ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.
channelRegistered in interface io.netty.channel.ChannelInboundHandlercontext - the ChannelHandlerContext for which the bind operation is madepublic void channelUnregistered(io.netty.channel.ChannelHandlerContext context)
Channel of the ChannelHandlerContext was unregistered from its EventLoopchannelUnregistered in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext context)
Channel changed. You can check the state with
Channel.isWritable().channelWritabilityChanged in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongspublic void exceptionCaught(io.netty.channel.ChannelHandlerContext context,
Throwable cause)
ChannelHandlerContext.fireExceptionCaught(Throwable) in the ChannelPipelineexceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongscause - Exception caughtpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext context,
Object event)
RntbdClientChannelHandler pipeline
All but inbound request management events are ignored.
userEventTriggered in interface io.netty.channel.ChannelInboundHandlercontext - ChannelHandlerContext to which this RntbdRequestManager belongsevent - An object representing a user eventpublic void bind(io.netty.channel.ChannelHandlerContext context,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
bind in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the bind operation is madelocalAddress - the SocketAddress to which it should boundpromise - the ChannelPromise to notify once the operation completespublic void close(io.netty.channel.ChannelHandlerContext context,
io.netty.channel.ChannelPromise promise)
close in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the close operation is madepromise - the ChannelPromise to notify once the operation completespublic void connect(io.netty.channel.ChannelHandlerContext context,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
connect in interface io.netty.channel.ChannelOutboundHandlercontext - 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 completespublic void deregister(io.netty.channel.ChannelHandlerContext context,
io.netty.channel.ChannelPromise promise)
EventLoop.deregister in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the deregister operation is madepromise - the ChannelPromise to notify once the operation completespublic void disconnect(io.netty.channel.ChannelHandlerContext context,
io.netty.channel.ChannelPromise promise)
disconnect in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the disconnect operation is madepromise - the ChannelPromise to notify once the operation completespublic void flush(io.netty.channel.ChannelHandlerContext context)
The flush operation will try to flush out all previous written messages that are pending.
flush in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the flush operation is madepublic void read(io.netty.channel.ChannelHandlerContext context)
ChannelHandlerContext.read()read in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the read operation is madepublic void write(io.netty.channel.ChannelHandlerContext context,
Object message,
io.netty.channel.ChannelPromise promise)
The write operation will send messages through the ChannelPipeline which are then ready to be flushed
to the actual Channel. This will occur when Channel.flush() is called.
write in interface io.netty.channel.ChannelOutboundHandlercontext - the ChannelHandlerContext for which the write operation is mademessage - the message to writepromise - the ChannelPromise to notify once the operation completesCopyright © 2020. All rights reserved.