Search in sources :

Example 1 with TextWriteHandler

use of com.hazelcast.nio.ascii.TextWriteHandler in project hazelcast by hazelcast.

the class SocketWriterInitializerImpl method initHandler.

private void initHandler(TcpIpConnection connection, SocketWriter writer, String protocol) {
    WriteHandler handler;
    if (CLUSTER.equals(protocol)) {
        IOService ioService = connection.getConnectionManager().getIoService();
        handler = ioService.createWriteHandler(connection);
    } else if (CLIENT_BINARY_NEW.equals(protocol)) {
        handler = new ClientWriteHandler();
    } else {
        handler = new TextWriteHandler(connection);
    }
    writer.initWriteHandler(handler);
}
Also used : IOService(com.hazelcast.nio.IOService) TextWriteHandler(com.hazelcast.nio.ascii.TextWriteHandler) WriteHandler(com.hazelcast.internal.networking.WriteHandler) TextWriteHandler(com.hazelcast.nio.ascii.TextWriteHandler)

Aggregations

WriteHandler (com.hazelcast.internal.networking.WriteHandler)1 IOService (com.hazelcast.nio.IOService)1 TextWriteHandler (com.hazelcast.nio.ascii.TextWriteHandler)1