Examples of AccountManager


Examples of org.jivesoftware.smack.AccountManager

                if (password == null) {
                    logger.warn("No password configured for user: " + user);
                }

                if (createAccount) {
                    AccountManager accountManager = new AccountManager(connection);
                    accountManager.createAccount(user, password);
                }
                if (resource != null) {
                    connection.login(user, password, resource);
                } else {
                    connection.login(user, password);
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

                    connection = new XMPPConnection(host);
                }
            }
            if (login && !connection.isAuthenticated()) {
                if (user != null) {
                    AccountManager accountManager = new AccountManager(connection);
                    accountManager.createAccount(user, password);

                    log.info("Logging in to Jabber as user: " + user + " on connection: " + connection);
                    connection.login(user, password, resource);
                }
                else {
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

                if (password == null) {
                    LOG.warn("No password configured for user: " + user + " on connection: " + getConnectionMessage(connection));
                }

                if (createAccount) {
                    AccountManager accountManager = new AccountManager(connection);
                    accountManager.createAccount(user, password);
                }
                if (login) {
                    if (resource != null) {
                        connection.login(user, password, resource);
                    } else {
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

                if (password == null) {
                    LOG.warn("No password configured for user: " + user + " on connection: " + getConnectionMessage(connection));
                }

                if (createAccount) {
                    AccountManager accountManager = new AccountManager(connection);
                    accountManager.createAccount(user, password);
                }
                if (resource != null) {
                    connection.login(user, password, resource);
                } else {
                    connection.login(user, password);
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

                if (password == null) {
                    LOG.warn("No password configured for user: " + user);
                }

                if (createAccount) {
                    AccountManager accountManager = new AccountManager(connection);
                    accountManager.createAccount(user, password);
                }
                if (resource != null) {
                    connection.login(user, password, resource);
                } else {
                    connection.login(user, password);
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

      return true;
    } catch (XMPPException e) {
      e.printStackTrace();
      if(e.getXMPPError() != null && e.getXMPPError().getCode() == 401) {
        Kernel.debug(this,"Unauthorized.. trying to register ..",-1);
        AccountManager manager = new AccountManager(connection);
        try {
          manager.createAccount(StringUtils.parseName(jid),password);
          login();
          return true;
        } catch (XMPPException e1) {
          e1.printStackTrace();
          return false;
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

    private void createAccount()
    {
        try
        {
            AccountManager accountManager = new AccountManager(connection);
            accountManager.createAccount(user, password);
        }
        catch (XMPPException ex)
        {
            // User probably already exists, throw away...
            logger.warn("Account (" + user + ") already exists");
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

    }.start();
  }
  public void tryRegister() throws XMPPException {
    if(conn != null) conn.close();
    createConnection();
    AccountManager manager = new AccountManager(conn);
    manager.createAccount(account.getUsername(),account.password);
    conn.close();
    conn = null;
  }
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

                    connection = new XMPPConnection(host);
                }
            }
            if (login && !connection.isAuthenticated()) {
                if (user != null) {
                    AccountManager accountManager = new AccountManager(connection);
                    accountManager.createAccount(user, password);

                    log.info("Logging in to Jabber as user: " + user + " on connection: " + connection);
                    connection.login(user, password, resource);
                }
                else {
View Full Code Here

Examples of org.jivesoftware.smack.AccountManager

        if (jpwdPassword.getText().equals(jpwdPasswordwiederholung.getText()) ){
        strPassword = jpwdPassword.getText();

        //baut die Connection zum Server auf
        this.connectToServerNoPort(strIP);
        AccountManager accountManager = new AccountManager(xmppconnection);

        //führt die Registrierung durch
        try {
            accountManager.createAccount(strUsername, strPassword, attributes);
            JOptionPane.showMessageDialog(null, "Die Registrierung war erfolgreich. Sie können sich nun anmelden.");
            this.dispose();
        } catch (XMPPException ex) {
            Logger.getLogger(UseraccountWindow.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.