@PrivateApi public class TextChannelInboundHandler extends Object implements ChannelInboundHandler
Constructor and Description |
---|
TextChannelInboundHandler(TcpIpConnection connection,
TextChannelOutboundHandler outboundHandler) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
TextChannelOutboundHandler |
getOutboundHandler() |
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 TextChannelInboundHandler(TcpIpConnection connection, TextChannelOutboundHandler outboundHandler)
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 TextChannelOutboundHandler getOutboundHandler()
public void closeConnection()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.