/** * Prevents sending the delta to the server. But the connection * still seems connected. */ public void preventSending(int clientNumber) { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.removeClientConnection(connection); connection.setServerMock(null); }
/** * Prevents sending the delta to the server. But the connection * still seems connected. */ public void preventSending(int clientNumber) { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.removeClientConnection(connection); connection.setServerMock(null); }
/** * Disconnect a single client from server. */ public void killClient(int clientNumber) { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.removeClientConnection(connection); connection.setOpen(false); connection.getReceivedDeltas().clear(); connection.getSentDeltas().clear(); connection.setServerMock(null); }
/** * Disconnect a single client from server. */ public void killClient(int clientNumber) { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.removeClientConnection(connection); connection.setOpen(false); connection.getReceivedDeltas().clear(); connection.getSentDeltas().clear(); connection.setServerMock(null); }
/** * Reconnect a single client from server * @throws OperationException * @throws TransformException */ public void reconnectClient(int clientNumber) throws ChannelException, TransformException, OperationException { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.addClientConnection(connection); connection.setServerMock(serverMock); connection.setOpen(true); connection.reconnect(client.getReconnectionVersions()); }
/** * Reconnect a single client from server * @throws OperationException * @throws TransformException */ public void reconnectClient(int clientNumber) throws ChannelException, TransformException, OperationException { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.addClientConnection(connection); connection.setServerMock(serverMock); connection.setOpen(true); connection.reconnect(client.getReconnectionVersions()); }
for (int i = 0; i < numClients; i++) { ServerConnectionMock serverConnectionMock = new ServerConnectionMock(); serverConnectionMock.setServerMock(serverMock); serverMock.addClientConnection(serverConnectionMock);
for (int i = 0; i < numClients; i++) { ServerConnectionMock serverConnectionMock = new ServerConnectionMock(); serverConnectionMock.setServerMock(serverMock); serverMock.addClientConnection(serverConnectionMock);