Search in sources :

Example 1 with PacketHandler

use of com.hazelcast.spi.impl.PacketHandler in project hazelcast by hazelcast.

the class TcpIpConnection_BaseTest method setup.

@Before
public void setup() throws Exception {
    super.setup();
    packetsB = Collections.synchronizedList(new ArrayList<Packet>());
    startAllConnectionManagers();
    ioServiceB.packetHandler = new PacketHandler() {

        @Override
        public void handle(Packet packet) throws Exception {
            packetsB.add(packet);
        }
    };
}
Also used : Packet(com.hazelcast.nio.Packet) PacketHandler(com.hazelcast.spi.impl.PacketHandler) ArrayList(java.util.ArrayList) Before(org.junit.Before)

Example 2 with PacketHandler

use of com.hazelcast.spi.impl.PacketHandler in project hazelcast by hazelcast.

the class TcpIpConnectionManager_TransmitTest method setup.

@Override
@Before
public void setup() throws Exception {
    super.setup();
    connManagerA.start();
    ioServiceB.packetHandler = new PacketHandler() {

        @Override
        public void handle(Packet packet) throws Exception {
            packetsB.add(packet);
        }
    };
}
Also used : Packet(com.hazelcast.nio.Packet) PacketHandler(com.hazelcast.spi.impl.PacketHandler) UnknownHostException(java.net.UnknownHostException) Before(org.junit.Before)

Aggregations

Packet (com.hazelcast.nio.Packet)2 PacketHandler (com.hazelcast.spi.impl.PacketHandler)2 Before (org.junit.Before)2 UnknownHostException (java.net.UnknownHostException)1 ArrayList (java.util.ArrayList)1