Package nu.fw.jeti.jabber

Examples of nu.fw.jeti.jabber.JID


            label.setPresence(s);
        }
       
        // for jid labels for given jid
        //String str = BSPresenceBean.getJIDHashString(pi.getJID(), true);
        JID key = pi.getFrom();
        //BSJIDLabelList labels = (BSJIDLabelList) jidLabels.get(str);
        BSJIDLabelList labels = (BSJIDLabelList) jidLabels.get(key);
        if (labels == null)
            return;
        // sets the right icon
View Full Code Here


    public void actionPerformed(ActionEvent e) {
        Object src = e.getSource();
       
        // opens chat
        if (src == chatMenuItem) {
            JID j = chatMenuItem.getJID();
            if (j != null)
                mapPanel.openChat(j);
        }
       
        // sends message
        if (src == msgMenuItem) {
            JID j = msgMenuItem.getJID();
            if (j != null)
                mapPanel.sendMessage(j);
        }
        /*
        // subscribes for presence
View Full Code Here

                        subject = subjectTextField.getText();
                        body = bodyTextArea.getText();
                        String recipientName = (String) recipientComboBox.getSelectedItem();
                        jid = (JID) recipients.get(recipientName);
                        if (jid == null)
                            jid = new JID(recipientName);
                        //if (nick.equals("") || server.equals("") || roomName.equals(""))
                        if (jid == null) {
                            JOptionPane.showMessageDialog(parent,
                                          "Invalid recipient JID",
                                          "Error",
View Full Code Here

        if (name.equals("item")) {
            if(items==null) {
                items = new LinkedList();
            }
            try {
                JID jid = JID.checkedJIDFromString(attr.getValue("jid"));
                items.add(new XMUCUser(attr.getValue("affiliation"),
                                       attr.getValue("role"),
                                       null, jid, 0));
            } catch (InstantiationException e) {
                Log.xmlParseException(e);
View Full Code Here

    /** Refreshes presences and updates label icon */
    public void refreshPresences() {
        presences.clear();
        Enumeration jids = getJIDs();
        while(jids.hasMoreElements()) {
            JID j = (JID) jids.nextElement();
            JIDStatus pi = Roster.getJIDStatus(j);
            //String str = BSPresenceBean.getJIDHashString(j, true);
            if (pi == null) {
                pi = new UnknownJIDStatus(j);
            }
View Full Code Here

   
    /** Sets presence */
    public void setPresence(JIDStatus pi) {
        if (pi == null) return;
        //String str = BSPresenceBean.getJIDHashString(pi.getJID(), true);
        JID key = pi.getJID();
        //if (presences.get(str) != null) {
        if (presences.get(key) != null) {
            //presences.put(str, pi);
            presences.put(key, pi);
       
View Full Code Here

    /** Clears all presences */
    public void clearPresences() {
        presences.clear();
        Enumeration jids = getJIDs();
        while(jids.hasMoreElements()) {
            JID j = (JID) jids.nextElement();
            JIDStatus pi = new UnknownJIDStatus(j);
             //String str = BSPresenceBean.getJIDHashString(j, false);
            //presences.put(str, pi);
            presences.put(j, pi);
        }
View Full Code Here

        if(iq.getType().equals("result"))
        {
          IQExtension e = iq.getIQExtension();
          if(e instanceof Socks5Extension)
          {
            JID streamHostJID = ((Socks5Extension)e).getStreamHostUsed();
            if(streamHostJID!=null)
            {
              if(!streamHostJID.equals(backend.getMyJID()))
              {
                if(proxyServerThread!=null)proxyServerThread.interrupt();
                doProxy(streamHostJID,iq.getFrom());
              }
            }
View Full Code Here

    backend.addListener(StatusChangeListener.class,new StatusChangeListener()
    {
      public void connectionChanged(boolean online)
      {
        String proxy = Preferences.getString("filetransfer", "proxy", null);
        if(proxy!=null) getProxyInfo(backend,new JID(proxy));
        getProxyInfo(backend,new JID("proxy.jabber.org"));
        getProxyInfo(backend,new JID("proxy65.jabber.ccc.de"));
        //getProxyInfo(backend,new JID("proxy65.jabber.autocom.pl"));
          getProxyInfo(backend,new JID("proxy.netlab.cz"));
        //getProxyInfo(backend,new JID("proxy.jabber.cd.chalmers.se"));
        getProxyInfo(backend,new JID("proxy65.jaim.at"));
      }

      public void ownPresenceChanged(int show, String status)  {}

      public void exit(){}
View Full Code Here

    menuItem.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        String jidString =JOptionPane.showInputDialog(I18N.getText("drawing","Add_users_JID"));
        JID jid=null;
        try
        {
          jid = JID.checkedJIDFromString(jidString);
        } catch (InstantiationException e1)
        {
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.