@Test public void registers_a_listener_when_sockets_open() throws Exception { socket.onWebSocketConnect(session); verify(events).addClient(listener); }
@Override public void onWebSocketConnect(Session sess) { super.onWebSocketConnect(sess); listener = listenerFactory.createListener(sess); events.addClient(listener); }
EventSocket extends WebSocketAdapter { @Override public void onWebSocketConnect(Session sess) { super.onWebSocketConnect(sess); listener = listenerFactory.createListener(sess); events.addClient(listener); } }
EventSocket extends WebSocketAdapter { @Override public void onWebSocketConnect(Session sess) { super.onWebSocketConnect(sess); listener = listenerFactory.createListener(sess); events.addClient(listener); } EventSocket(WsEventListener events);  EventSocket(WsEventListener events, SessionToListener listenerFactory); }
EventSocket extends WebSocketAdapter { @Override public void onWebSocketConnect(Session sess) { super.onWebSocketConnect(sess); listener = listenerFactory.createListener(sess); events.addClient(listener); } EventSocket(WsEventListener events);  EventSocket(WsEventListener events, SessionToListener listenerFactory); @Override void onWebSocketConnect(Session sess); @Override void onWebSocketText(String message); @Override void onWebSocketClose(int statusCode, String reason); @Override void onWebSocketError(Throwable cause); }
EventSocket extends WebSocketAdapter { @Override public void onWebSocketConnect(Session sess) { super.onWebSocketConnect(sess); listener = listenerFactory.createListener(sess); events.addClient(listener); } EventSocket(WsEventListener events);  EventSocket(WsEventListener events, SessionToListener listenerFactory); @Override void onWebSocketConnect(Session sess); @Override void onWebSocketText(String message); @Override void onWebSocketClose(int statusCode, String reason); @Override void onWebSocketError(Throwable cause);  }