R - The type of object this handler will read.W - The type of object this handler will write.public abstract class AbstractContextHandler<R,W>
extends io.netty.channel.ChannelDuplexHandler
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
AbstractContextHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addKey(W msg,
java.lang.String key,
java.lang.String value)
Adds a key to the message that is written.
|
protected abstract boolean |
isAcceptableToRead(java.lang.Object msg)
Asserts whether the passed message is an acceptable object type to read.
|
protected abstract boolean |
isAcceptableToWrite(java.lang.Object msg)
Asserts whether the passed message is an acceptable object type to write.
|
protected abstract ContextKeySupplier |
newKeySupplierForRead(R msg)
Creates a new
ContextKeySupplier for the passed message that is being read. |
protected abstract ContextKeySupplier |
newKeySupplierForWrite(W msg)
Creates a new
ContextKeySupplier for the passed message to be written. |
bind, close, connect, deregister, disconnect, flush, read, writechannelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredhandlerAdded, handlerRemoved, isSharableprotected abstract boolean isAcceptableToRead(java.lang.Object msg)
msg - Message that is being read.true if the message is acceptable.protected abstract boolean isAcceptableToWrite(java.lang.Object msg)
msg - Message that is being written.true if the message is acceptable.protected abstract void addKey(W msg, java.lang.String key, java.lang.String value)
msg - Message that is being written.key - Key name to add.value - Key value to add.protected abstract ContextKeySupplier newKeySupplierForWrite(W msg)
ContextKeySupplier for the passed message to be written.msg - Message to be written.ContextKeySupplierprotected abstract ContextKeySupplier newKeySupplierForRead(R msg)
ContextKeySupplier for the passed message that is being read.msg - Message that is being read.ContextKeySupplier