docs: private void installConnectionListeners(final XMPPConnection connection) {
          if (connection != null) {
              connectionListener = new AbstractConnectionClosedListener() {
                  @Override
                  public void connectionTerminated() {
                      unregisterInstanceFor(connection);
                  }
              };
              connection.addConnectionListener(connectionListener);
          }
      }