public void onDataReceived(RetainableByteBuffer data) { /* All subscribers are connected to the server, * let's start. */ if (data.remaining() == 0) throw new AssertionError(); m_thread = new Thread(this); m_thread.start(); }
public void onConnectionClosed() { System.out.println("PubClient: connection closed."); if (m_thread != null) { try { m_thread.join(); } catch (final InterruptedException ex) { ex.printStackTrace(); } m_thread = null; } m_session.getCollider().stop(); }