public class CacheClientRequestHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
ChannelHandler responsible for sending client requests and receiving server responses
in the context of a distributed cache server.| Modifier and Type | Field and Description |
|---|---|
private io.netty.channel.ChannelPromise |
channelPromise
The synchronization construct used to signal the client application that the server response has been received.
|
private InboundAdapter |
inboundAdapter
The object used to buffer and interpret the service response byte stream.
|
| Constructor and Description |
|---|
CacheClientRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
invoke(io.netty.channel.Channel channel,
OutboundAdapter outboundAdapter,
InboundAdapter inboundAdapter)
Perform a synchronous method call to the server.
|
channelActive, channelInactive, channelRegistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprivate InboundAdapter inboundAdapter
private io.netty.channel.ChannelPromise channelPromise
public void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws IOException
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterIOExceptionpublic void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx)
channelUnregistered in interface io.netty.channel.ChannelInboundHandlerchannelUnregistered in class io.netty.channel.ChannelInboundHandlerAdapterpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterpublic void invoke(io.netty.channel.Channel channel,
OutboundAdapter outboundAdapter,
InboundAdapter inboundAdapter)
throws IOException
channel - the network channel used to make the requestoutboundAdapter - the request payload, which might be a method name, and [0..n] concatenated argumentsinboundAdapter - the business logic to deserialize the server responseIOExceptionCopyright © 2022 Apache NiFi Project. All rights reserved.