public void stop(){
synchronized (privateInstanceLock) {
    if (connectionAcceptThread == null) {
      return;
    }
  }
  isStopped.set(true);
  try {
    connectionAcceptThread.interrupt();
    connectionAcceptThread.join();
  }
 catch (  InterruptedException e) {
  }
  try {
    serverSocket.close();
  }
 catch (  IOException e) {
  }
}

public void stop ( ) { synchronized ( privateInstanceLock ) { if ( connectionAcceptThread == null ) { return ; } } isStopped . set ( true ) ; try { connectionAcceptThread . interrupt ( ) ; connectionAcceptThread . join ( ) ; } catch ( InterruptedException e ) { } try { serverSocket . close ( ) ; } catch ( IOException e ) { } }
stops the communicator . all open connections to the remote server will be terminated . once this method has been called , the communicator cannot be restarted .
