@PrivateApi public class TextDecoder extends Object implements ChannelInboundHandler
Constructor and Description |
---|
TextDecoder(TcpIpConnection connection,
TextEncoder encoder) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
TextEncoder |
getEncoder() |
void |
onRead(ByteBuffer src)
A callback to indicate that data is available in the src ByteBuffer to be processed.
|
void |
publishRequest(TextCommand command) |
void |
sendResponse(TextCommand command) |
public TextDecoder(TcpIpConnection connection, TextEncoder encoder)
public void sendResponse(TextCommand command)
public void onRead(ByteBuffer src) throws Exception
ChannelInboundHandler
onRead
in interface ChannelInboundHandler
src
- the ByteBuffer containing the data to read. The ByteBuffer is already in reading mode and when completed,
should not be converted to write-mode using clear/compact.Exception
- if something fails while reading data from the ByteBuffer or processing the data (e.g. when a Packet
fails to get processed). When an exception is thrown, the ChannelErrorHandler
is called.public void publishRequest(TextCommand command)
public TextEncoder getEncoder()
public void closeConnection()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.