public class OldClientReadHandler extends Object implements ReadHandler
ReadHandler for the old client. It reads Packets and sends them to IOService.handleClientPacket(Packet).
Once the old client is deleted, this code can be deleted.OldClientWriteHandler| Constructor and Description |
|---|
OldClientReadHandler(Connection connection,
IOService ioService) |
| Modifier and Type | Method and Description |
|---|---|
void |
onRead(ByteBuffer src)
A callback to indicate that data is available in the ByteBuffer to be processed.
|
public OldClientReadHandler(Connection connection, IOService ioService)
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.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.