Ejemplo n.º 1
0
  public void connectToServer() {
    core.addLoginListener(this);
    BSConnectionBean connectionBean = core.getConnectionBean();
    if (connectionBean != null) {
      connectionBean.addConnectionListener(this);
    }
    messengerBean = core.getMessengerBean();
    if (messengerBean != null) {
      messengerBean.addMessageListener(this);
    }
    // "192.168.1.136"
    core.connect(username, password, buddy, serverXmpp, portXmpp, 1, false);

    presenceBean = core.getPresenceBean();
    presenceBean.addPresenceListener(this);
  }
Ejemplo n.º 2
0
 public void subscriptionRequested(JID jid) {
   log.debug("SubscriptionRequested: " + jid);
   presenceBean.sendSubscriptionApproved(jid);
 }