Beispiel #1
0
  /** Request to stop the listener/dispatch thread */
  public void stop() {
    if (receiveThread == null) return;

    receiveThread.finish();
    try {
      receiveThread.join(THREAD_WAIT_TIMEOUT);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    receiveThread = null;
  }