@ChannelHandler.Sharable public class HttpServerContextHandler extends AbstractServerContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>
correlator, logger, requestIdProvider| Constructor and Description |
|---|
HttpServerContextHandler(RequestIdProvider requestIdProvider,
RequestCorrelator correlator) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addKey(io.netty.handler.codec.http.HttpResponse response,
java.lang.String key,
java.lang.String value)
Adds a key to the message that is written.
|
protected java.lang.String |
getCurrentlyProcessingRequestId() |
protected boolean |
isAcceptableToRead(java.lang.Object msg)
Asserts whether the passed message is an acceptable object type to read.
|
protected boolean |
isAcceptableToWrite(java.lang.Object msg)
Asserts whether the passed message is an acceptable object type to write.
|
protected boolean |
isLastResponseFragmenTotWrite(java.lang.Object response) |
protected ContextKeySupplier |
newKeySupplierForRead(io.netty.handler.codec.http.HttpRequest msg)
Creates a new
ContextKeySupplier for the passed message that is being read. |
protected ContextKeySupplier |
newKeySupplierForWrite(io.netty.handler.codec.http.HttpResponse msg)
Creates a new
ContextKeySupplier for the passed message to be written. |
protected void |
newRequestIdWritten(java.lang.String requestId) |
channelRead, newContextContainer, writebind, close, connect, deregister, disconnect, flush, readchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic HttpServerContextHandler(RequestIdProvider requestIdProvider, RequestCorrelator correlator)
protected boolean isAcceptableToRead(java.lang.Object msg)
AbstractContextHandlerisAcceptableToRead in class AbstractContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>msg - Message that is being read.true if the message is acceptable.protected boolean isAcceptableToWrite(java.lang.Object msg)
AbstractContextHandlerisAcceptableToWrite in class AbstractContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>msg - Message that is being written.true if the message is acceptable.protected void addKey(io.netty.handler.codec.http.HttpResponse response,
java.lang.String key,
java.lang.String value)
AbstractContextHandleraddKey in class AbstractContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>response - Message that is being written.key - Key name to add.value - Key value to add.protected ContextKeySupplier newKeySupplierForWrite(io.netty.handler.codec.http.HttpResponse msg)
AbstractContextHandlerContextKeySupplier for the passed message to be written.newKeySupplierForWrite in class AbstractContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>msg - Message to be written.ContextKeySupplierprotected ContextKeySupplier newKeySupplierForRead(io.netty.handler.codec.http.HttpRequest msg)
AbstractContextHandlerContextKeySupplier for the passed message that is being read.newKeySupplierForRead in class AbstractContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>msg - Message that is being read.ContextKeySupplierprotected void newRequestIdWritten(java.lang.String requestId)
newRequestIdWritten in class AbstractServerContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>protected java.lang.String getCurrentlyProcessingRequestId()
getCurrentlyProcessingRequestId in class AbstractServerContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>protected boolean isLastResponseFragmenTotWrite(java.lang.Object response)
isLastResponseFragmenTotWrite in class AbstractServerContextHandler<io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.HttpResponse>