示例#1
0
    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();
    }
示例#2
0
 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();
 }