@PrivateApi public class TextReadHandler extends Object implements ReadHandler
| Constructor and Description |
|---|
TextReadHandler(TcpIpConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection() |
TextWriteHandler |
getTextWriteHandler() |
void |
onRead(ByteBuffer src)
A callback to indicate that data is available in the ByteBuffer to be processed.
|
void |
publishRequest(TextCommand command) |
void |
sendResponse(TextCommand command) |
public TextReadHandler(TcpIpConnection connection)
public void sendResponse(TextCommand command)
public void onRead(ByteBuffer src) throws Exception
ReadHandleronRead in interface ReadHandlersrc - 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. That is a task of the SocketReader.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 TcpIpConnection
is closed. There is no point continuing with a potentially corrupted stream.public void publishRequest(TextCommand command)
public TextWriteHandler getTextWriteHandler()
public void closeConnection()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.