public class UnifiedProtocolDecoder extends com.hazelcast.internal.networking.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.Constructor and Description |
---|
UnifiedProtocolDecoder(IOService ioService,
UnifiedProtocolEncoder protocolEncoder) |
Modifier and Type | Method and Description |
---|---|
void |
handlerAdded()
Gets called when this ChannelHandler is added to the pipeline.
|
com.hazelcast.internal.networking.HandlerStatus |
onRead()
A callback to indicate that data is available in the src to be
processed.
|
initSrcBuffer, initSrcBuffer
public UnifiedProtocolDecoder(IOService ioService, UnifiedProtocolEncoder protocolEncoder)
public void handlerAdded()
com.hazelcast.internal.networking.ChannelHandler
handlerAdded
in class com.hazelcast.internal.networking.ChannelHandler<com.hazelcast.internal.networking.InboundHandler,ByteBuffer,Void>
public com.hazelcast.internal.networking.HandlerStatus onRead() throws Exception
com.hazelcast.internal.networking.InboundHandler
onRead
in class com.hazelcast.internal.networking.InboundHandler<ByteBuffer,Void>
Exception
- if something fails while reading data from the src
or processing the data (e.g. when a Packet fails to get processed). When an
exception is thrown, the ChannelErrorHandler
is called.Copyright © 2019 Hazelcast, Inc.. All rights reserved.