public class ProtocolDecoder extends InboundHandler<ByteBuffer,Void>
InboundHandler
that reads the protocol bytes
Protocols
and based on the protocol it creates the
appropriate handlers.
The ProtocolDecoder doesn't forward to the dst; it replaces itself once the
protocol bytes are known. So that is why the Void type for dst.channel, dst, src
Constructor and Description |
---|
ProtocolDecoder(IOService ioService,
ProtocolEncoder protocolEncoder) |
Modifier and Type | Method and Description |
---|---|
void |
handlerAdded()
Gets called when this ChannelHandler is added to the pipeline.
|
HandlerStatus |
onRead()
A callback to indicate that data is available in the src to be
processed.
|
initSrcBuffer, initSrcBuffer
dst, dst, interceptError, requestClose, setChannel, src, src
public ProtocolDecoder(IOService ioService, ProtocolEncoder protocolEncoder)
public void handlerAdded()
ChannelHandler
handlerAdded
in class ChannelHandler<InboundHandler,ByteBuffer,Void>
public HandlerStatus onRead()
InboundHandler
onRead
in class InboundHandler<ByteBuffer,Void>
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.