R - The type of object this handler will read.W - The type of object this handler will write.public abstract class AbstractServerContextHandler<R,W> extends AbstractContextHandler<R,W>
ContextsContainers for servers. This handler does the
following:
ContextsContainer for that request. This will create the ContextsContainer instance using the factory
method newContextContainer(ContextKeySupplier). In case, any changes to the implementation of
ContextsContainer is required, it should be done via overriding this factory method.BiDirectional contexts which are modified back to the response. The modified contexts are found
by the method ContextsContainer.getModifiedBidirectionalContexts()| Modifier and Type | Field and Description |
|---|---|
protected RequestCorrelator |
correlator |
protected static org.slf4j.Logger |
logger |
protected RequestIdProvider |
requestIdProvider |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServerContextHandler(RequestCorrelator correlator,
RequestIdProvider requestIdProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
protected abstract java.lang.String |
getCurrentlyProcessingRequestId() |
protected abstract boolean |
isLastResponseFragmenTotWrite(java.lang.Object response) |
protected ContextsContainer |
newContextContainer(ContextKeySupplier keySupplier) |
protected abstract void |
newRequestIdWritten(java.lang.String requestId) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
addKey, isAcceptableToRead, isAcceptableToWrite, newKeySupplierForRead, newKeySupplierForWritebind, close, connect, deregister, disconnect, flush, readchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredhandlerAdded, handlerRemoved, isSharableprotected static final org.slf4j.Logger logger
protected final RequestIdProvider requestIdProvider
protected final RequestCorrelator correlator
protected AbstractServerContextHandler(RequestCorrelator correlator, RequestIdProvider requestIdProvider)
public void channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
throws java.lang.Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerjava.lang.Exceptionprotected abstract void newRequestIdWritten(java.lang.String requestId)
protected abstract java.lang.String getCurrentlyProcessingRequestId()
protected abstract boolean isLastResponseFragmenTotWrite(java.lang.Object response)
protected ContextsContainer newContextContainer(ContextKeySupplier keySupplier)