public interface ChannelOutboundHandler<F extends OutboundFrame>
ByteBuffer. For example a Packet needs to be written to a socket, then it is taken from the queue of pending packets, the ChannelOutboundHandler is called with the Packet and the socket buffer as argument and will then write the content of the packet to the buffer. And on completion, the content of the buffer is written to the socket.
ChannelOutboundHandlerare not expected to be thread-safe; each channel will gets its own instance(s). A
ChannelOutboundHandleris constructed through a
ChannelInitializer. For more information about the ChannelOutboundHandler (and handlers in generally), have a look at the
ChannelInboundHandler. If the main task of a ChannelOutboundHandler is to encode a message (e.g. a Packet), it is best to call this handler an encoder. For example PacketEncoder.
boolean onWrite(F frame, ByteBuffer dst) throws Exception
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.