public class PacketEncoder extends OutboundHandler<Supplier<Packet>,ByteBuffer>
OutboundHandler
that for member to member communication.
It writes Packet
instances to the ByteBuffer
.
It makes use of a flyweight to allow the sharing of a packet-instance over
multiple connections. The flyweight contains the actual 'position' state of
what has been written.PacketDecoder
channel, dst, src
Constructor and Description |
---|
PacketEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
handlerAdded()
Gets called when this ChannelHandler is added to the pipeline.
|
HandlerStatus |
onWrite()
A callback to indicate that this OutboundHandler should be
processed.
|
initDstBuffer, initDstBuffer, initDstBuffer
dst, dst, interceptError, setChannel, src, src
public void handlerAdded()
ChannelHandler
handlerAdded
in class ChannelHandler<OutboundHandler,Supplier<Packet>,ByteBuffer>
public HandlerStatus onWrite()
OutboundHandler
onWrite
in class OutboundHandler<Supplier<Packet>,ByteBuffer>
HandlerStatus
the status of the handler after processing the src.Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.