Ejemplo n.º 1
0
 public boolean flagClientForRemoval(int id) {
   boolean result = false;
   synchronized (this) {
     clientConnections.put(id, null);
   }
   server.flagCarForRemoval(id);
   return result;
 }
Ejemplo n.º 2
0
 public boolean addClient(int id, ClientConnection conn, Car car) {
   boolean success = false;
   synchronized (this) {
     if (clientConnections.get(id) == null) {
       server.addCar(id, car);
       clientConnections.put(id, conn);
       success = true;
     }
   }
   return success;
 }
Ejemplo n.º 3
0
 public void updateKeyStates(int id, KeyStates keyStates) {
   server.updateKeyStates(id, keyStates);
 }