Package nu.fw.jeti.jabber

Examples of nu.fw.jeti.jabber.JID


        if (!xmppConnection.isLoggedIn()) {
            return;
        }

        RTPBridge rtpPacket = new RTPBridge(sessionID, RTPBridge.BridgeAction.change);
        JID to = new JID(RTPBridge.NAME + "." + xmppConnection.getMyJID().getDomain());
        //rtpPacket.setType(Type.SET);

        rtpPacket.setPass(pass);
        rtpPacket.setPortA(localCandidate.getPort());
        rtpPacket.setPortB(proxyCandidate.getPort());
View Full Code Here


        if (!xmppConnection.isLoggedIn()) {
            return null;
        }

        RTPBridge rtpPacket = new RTPBridge(RTPBridge.BridgeAction.publicip);
        JID to = new JID(RTPBridge.NAME + "." + xmppConnection.getMyJID().getDomain());
        //rtpPacket.setType(Type.SET);

        // System.out.println("Relayed to: " + candidate.getIp() + ":" + candidate.getPort());

//        PacketCollector collector = xmppConnection
View Full Code Here

    {
      for(int i=0;i<Plugin.ALERTERS_SIZE;i++)
          {
        if(Preferences.getBoolean("groupchatalerter","ruleEnabled"+i, false))
        {
          JID jid = JID.jidFromString(Preferences.getString("groupchatalerter","room"+i,null));
          if(isMonitoring(jid))
          {
            synchronized (alerters)
            {
              jid =((Alerter)alerters.get(jid)).getJID();
              sendPresence(jid,Presence.AWAY,Preferences.getString(
                  "groupchatalerter","alerterStatusMessage","alerter"));
            }
          }
          else
          {
            JID j2 = nu.fw.jeti.plugins.groupchat.Plugin.getGroupchatJID(jid);
            if(j2!=null)
            {//groupchat already loaded, init with that groupchat nickname
              jid =j2;
            }
            Plugin.addAlerter(new Alerter(backend,jid,Preferences.getString("groupchatalerter","rule"+i,null)),jid);
View Full Code Here

        jidComboBox.setEditable(true);
        final TreeMap jids = new TreeMap();
        Iterator rosterItems = Roster.getJIDStatussen();
        while (rosterItems.hasNext()) {
            JIDStatus ri = (JIDStatus) rosterItems.next();
            JID jid = ri.getJID();
            String label = ri.getNick() + " (" + jid.toString() + ")";
            jids.put(label, jid);
            //jidComboBox.addItem(label);
        }
        TreeMap tmpMap = (TreeMap) jids.clone();
        while (!tmpMap.isEmpty()) {
View Full Code Here

            if (ext instanceof MapTag) {
                MapTag map = (MapTag) ext;
               // logMap(map);
                // adds map into temporary hashtable
                curMaps.add(map);
                JID jid = msg.getFrom();
                String completeID = new String(jid.getUser() + "@" +
                                               jid.getDomain() + "/" + map.getID());
                maps.put(completeID, map);
            }
        }
       
        // if that was not map message ends
        if (curMaps.isEmpty())
            return;
       
        // if it was map message, looks for included map images
        extensions = msg.getExtensions();
        while (extensions.hasNext()) {
            Extension ext = (Extension) extensions.next();
            // for all included files
            if (ext instanceof IQXOOB) {
              IQXOOB oob = (IQXOOB) ext;
                JID jid = msg.getFrom();
                try {
                    handleMapOOB(oob, jid);
                } catch (IOException e) {}
            }
        }
       
        // for all just received maps
        Enumeration mapEnum = curMaps.elements();
        while (mapEnum.hasMoreElements()) {
            JID jid = msg.getFrom();
            String originID = new String(jid.getUser() + "@" + jid.getDomain());
            MapTag map = (MapTag) mapEnum.nextElement();
            // add references to referenced maps
            processMap(map, originID);
            // saves map into local cache
            saveMap(map, originID);
View Full Code Here

    File files[]  = dir.listFiles();
    for(int i = 0;i<files.length;i++)
    {
      String name = files[i].getName();
      name = name.substring(0,name.length()-4);
      JID jid=null;
      try
      {
        jid = JID.checkedJIDFromString(name);
      } catch (InstantiationException e)
      {
View Full Code Here

  {
    this.backend = backend;
    messages = new MessagesStore();
    presences = new HashMap();
    backend.addListener(ChatEndedListener.class, this);
    if(jid.getResource()==null)jid = new JID(jid.getUser(),jid.getDomain()
        ,backend.getMyJID().getUser());
    this.jid = jid;
    backend.addMessageListener(jid, this);
    backend.addPresenceListener(jid,this);
    sendPresence(jid,Presence.AWAY,Preferences.getString(
View Full Code Here

    {
      public void optionChoosed(int option)
      {
        if (option == javax.swing.JOptionPane.NO_OPTION)
        {
          JID temp = packet.getFrom()
          JID jid = new JID(temp.getUser(),temp.getDomain(),backend.getMyJID().getUser());
          Plugin.startGroupchat(jid, backend);
        }
        else
        {
         
View Full Code Here

    groupchatMenu.addSeparator();
   
    for(Iterator i = conferences.iterator();i.hasNext();)
    {
      Conference conference = (Conference)i.next();
      JID room = conference.getJid();
      String nick = conference.getNick();
      if(nick==null) nick = backend.getMyJID().getUser();
      final JID jid = new JID(room.getUser(),room.getDomain(),nick);
            if(conference.autoJoins() && open)startGroupchat(jid);
      menuItem = new JMenuItem(conference.getName());
      menuItem.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
View Full Code Here

    {
      public void optionChoosed(int option)
      {
        if (option == javax.swing.JOptionPane.NO_OPTION)
        {
          JID temp = getRoom()
          JID jid = new JID(temp.getUser(),temp.getDomain(),backend.getMyJID().getUser());
          //backend.send(new Presence(jid,"available"));//,new XMUC()));
                    Plugin.startGroupchat(jid,backend);
        }
      }
    };
View Full Code Here

TOP

Related Classes of nu.fw.jeti.jabber.JID

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.