Package com.anzsoft.client.XMPP.mandioca

Examples of com.anzsoft.client.XMPP.mandioca.XmppSession


   {
     String newStatus = statusEditor.getText();
     if(!newStatus.equalsIgnoreCase(status.status()))
     {
       String show = status.show();
       XmppSession session = JabberApp.instance().getSession();
       if(show == null||show.isEmpty())
       {
        
         session.getUser().sendPresence(PresenceShow.emptyShow(), newStatus);
       }
       else
       {
         session.getUser().sendPresence(PresenceShow.get(show), newStatus);
       }
     }
     statusLabel.setVisible(true);
     statusEditor.setVisible(false);
   }
View Full Code Here


   private void changeShow(final String show)
   {
     if(!show.equals(status.show()))
     {

       XmppSession session = JabberApp.instance().getSession();
       if(show == null||show.isEmpty())
         session.getUser().sendPresence(PresenceShow.emptyShow(),status.status());
       else
         session.getUser().sendPresence(PresenceShow.get(show),status.status());
     }
   }
View Full Code Here

    setButtonBar(bar);
  }
 
  private void getRooms(final String jid)
  {
    XmppSession session = JabberApp.instance().getSession();
    XmppQuery query = session.getFactory().createQuery();
    query.setIQ(jid, XmppQuery.TYPE_GET, TextUtils.genUniqueId());
    query.setQuery("http://jabber.org/protocol/disco#items");
    session.send(query,new XmppPacketListener()
    {
      public void onPacketReceived(XmppPacket packet)
      {
        onRooms(packet);
      }
View Full Code Here

  public void onLogin(final String user,final String pass,XmppEventAdapter eventAdapter)
  {
    initConnection();
    if(eventAdapter != null)
      connection.addEventListener(eventAdapter);
    session = new XmppSession(connection, true);
    disco = new ServiceDiscovery(session);
    new XmppPushRoster(session);
    XmppUserSettings userSetting = new XmppUserSettings(host,port,domain, user, pass, AuthType.fromString(authType));
    session.login(userSetting);
    session.getUser().getRoster().addRosterListener(createRosterListener());
View Full Code Here

  {
    this.domain = domain;
    initConnection();
    if(eventAdapter != null)
      connection.addEventListener(eventAdapter);
    session = new XmppSession(connection, true);
    disco = new ServiceDiscovery(session);
    new XmppPushRoster(session);
    XmppUserSettings userSetting;
    if(sasl)
      userSetting = new XmppUserSettings(host,port,domain, user, pass, XmppUserSettings.SASL);
View Full Code Here

TOP

Related Classes of com.anzsoft.client.XMPP.mandioca.XmppSession

Copyright © 2018 www.massapicom. 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.