@Test public void test_listClients_unknown_room() { final SocketIoAdapter adapter = ADAPTER_FACTORY.createAdapter(null); assertEquals(0, adapter.listClients("foo").length); assertEquals(0, adapter.listClients("bar").length); }
@Override public SocketIoSocket[] listClients(String room) throws IllegalArgumentException { if (room == null) { throw new IllegalArgumentException("room must not be null."); } if (mRoomSockets.containsKey(room)) { return mRoomSockets.get(room).toArray(new SocketIoSocket[0]); } else { return new SocketIoSocket[0]; } }
SocketIoMemoryAdapter extends SocketIoAdapter { @Override public SocketIoSocket[] listClients(String room) throws IllegalArgumentException { if (room == null) { throw new IllegalArgumentException("room must not be null."); } if (mRoomSockets.containsKey(room)) { return mRoomSockets.get(room).toArray(new SocketIoSocket[0]); } else { return new SocketIoSocket[0]; } } }
SocketIoMemoryAdapter extends SocketIoAdapter { @Override public SocketIoSocket[] listClients(String room) throws IllegalArgumentException { if (room == null) { throw new IllegalArgumentException("room must not be null."); } if (mRoomSockets.containsKey(room)) { return mRoomSockets.get(room).toArray(new SocketIoSocket[0]); } else { return new SocketIoSocket[0]; } } private  SocketIoMemoryAdapter(SocketIoNamespace namespace); }
SocketIoMemoryAdapter extends SocketIoAdapter { @Override public SocketIoSocket[] listClients(String room) throws IllegalArgumentException { if (room == null) { throw new IllegalArgumentException("room must not be null."); } if (mRoomSockets.containsKey(room)) { return mRoomSockets.get(room).toArray(new SocketIoSocket[0]); } else { return new SocketIoSocket[0]; } } private  SocketIoMemoryAdapter(SocketIoNamespace namespace); @Override synchronized void broadcast(Packet packet, String[] rooms, String[] socketsExcluded); @Override synchronized void add(String room, SocketIoSocket socket); @Override synchronized void remove(String room, SocketIoSocket socket); @Override SocketIoSocket[] listClients(String room); @Override String[] listClientRooms(SocketIoSocket socket); }
SocketIoMemoryAdapter extends SocketIoAdapter { @Override public SocketIoSocket[] listClients(String room) throws IllegalArgumentException { if (room == null) { throw new IllegalArgumentException("room must not be null."); } if (mRoomSockets.containsKey(room)) { return mRoomSockets.get(room).toArray(new SocketIoSocket[0]); } else { return new SocketIoSocket[0]; } } private  SocketIoMemoryAdapter(SocketIoNamespace namespace); @Override synchronized void broadcast(Packet packet, String[] rooms, String[] socketsExcluded); @Override synchronized void add(String room, SocketIoSocket socket); @Override synchronized void remove(String room, SocketIoSocket socket); @Override SocketIoSocket[] listClients(String room); @Override String[] listClientRooms(SocketIoSocket socket);  }