Beispiel #1
0
  @Override
  public void connect() {
    connectionID = "dummy-" + new Random(new Date().getTime()).nextInt();

    if (reconnect) {
      for (ConnectionListener listener : getConnectionListeners()) {
        listener.reconnectionSuccessful();
      }
    }
  }
Beispiel #2
0
  @Override
  public void disconnect(Presence unavailablePresence) {
    user = null;
    connectionID = null;
    roster = null;
    authenticated = false;
    anonymous = false;

    for (ConnectionListener listener : getConnectionListeners()) {
      listener.connectionClosed();
    }
    reconnect = true;
  }