}
});
// ----
Client client = new Client();
register(client.getKryo());
ObjectSpace clientObjectSpace = new ObjectSpace(client);
final TestObjectImpl clientTestObject = new TestObjectImpl(1234);
clientObjectSpace.register((short)12, clientTestObject);
startEndPoint(client);
client.addListener(new Listener() {
public void connected (final Connection connection) {
RmiTest.runTest(connection, 42, 4321);
}
public void received (Connection connection, Object object) {
if (!(object instanceof MessageWithTestObject)) return;
MessageWithTestObject m = (MessageWithTestObject)object;
System.out.println(clientTestObject.value);
System.out.println(((TestObjectImpl)m.testObject).value);
assertEquals(1234f, m.testObject.other());
stopEndPoints(2000);
}
});
client.connect(5000, host, tcpPort);
waitForThreads();
}