public class SingleProtocolDecoder extends InboundHandler<ByteBuffer,Void>
channel, dst, src
Constructor and Description |
---|
SingleProtocolDecoder(ProtocolType supportedProtocol,
InboundHandler[] next,
MemberProtocolEncoder encoder)
Decodes first 3 incoming bytes, validates against
supportedProtocol and, when
matching, replaces itself in the inbound pipeline with the next InboundHandler s. |
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, setChannel, src, src
public SingleProtocolDecoder(ProtocolType supportedProtocol, InboundHandler[] next, MemberProtocolEncoder encoder)
supportedProtocol
and, when
matching, replaces itself in the inbound pipeline with the next InboundHandler
s.supportedProtocol
- the ProtocolType
supported by this ProtocolDecoder
next
- the InboundHandler
s to replace this one in the inbound pipeline
upon match of protocol bytesencoder
- a OutboundHandler
that will be notified when matching protocol
bytes have been receivedpublic void handlerAdded()
ChannelHandler
handlerAdded
in class ChannelHandler<InboundHandler,ByteBuffer,Void>
public HandlerStatus onRead()
InboundHandler
onRead
in class InboundHandler<ByteBuffer,Void>
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.