private synchronized void stopListening() {
    for (ListeningConnection connection : myListeningConnections) {
      connection.myChannelRegistrar.close();
    }
    myListeningConnections.clear();
  }
private synchronized void stopListening()