NIOSingleStepByteToMessageDecoder
A simplified version of ByteToMessageDecoder
that can generate zero or one messages for each invocation of decode
or decodeLast
. Having decode
and decodeLast
return an optional message avoids re-entrancy problems, since the functions relinquish exclusive access to the ByteBuffer
when returning. This allows for greatly simplified processing.
protocol NIOSingleStepByteToMessageDecoder : ByteToMessageDecoder
Browse conforming typesMany ByteToMessageDecoder
’s can trivially be translated to NIOSingleStepByteToMessageDecoder
’s. You should not implement ByteToMessageDecoder
’s decode
and decodeLast
methods.