Examples of IQResultListener


Examples of nu.fw.jeti.events.IQResultListener

  }
 
  /*------------------------------InfoQuery------------------------*/
  private void infoQuery(InfoQuery infoQuery)
  {
    IQResultListener iqrListener = iqTimerQueue.getInfoQueryListener(infoQuery.getID());
    if(iqrListener!=null)
    {
      iqrListener.iqResult(infoQuery);
    }
    else
    {
      if (infoQuery.hasExtensions())
      {
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

        avatars.put(hash, icon);
        jidStatus.setAvatar(icon);
      }
      else
      {
        backend.send(new InfoQuery(jidStatus.getJID(),"get", new VCard()),new IQResultListener()
        {
          public void iqResult(InfoQuery iq)
          {
            IQExtension iqe = iq.getIQExtension();
            if(iqe instanceof VCard)
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

  }
 
  public void getVCard(Connect connect)
  {
    this.connect = connect;
    backend.send(new InfoQuery("get", new VCard()),new IQResultListener()
    {
      public void iqResult(InfoQuery iq)
      {
        IQExtension iqe = iq.getIQExtension();
        if(iqe instanceof VCard)
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

    backend.addExtensionHandler("http://www.jivesoftware.com/protocol/rtpbridge", new Provider());
    backend.addExtensionHandler("google:jingleinfo", new STUN.Provider());
   
    backend.addCapability("jingle","http://www.xmpp.org/extensions/xep-0166.html#ns");

    backend.addListener(IQResultListener.class,new IQResultListener(){
      public void iqResult(InfoQuery iq) {
        for (JingleSession session : manager.getAllSessions()){
          try {
            session.respond(new Jingle(iq));
          } catch (XMPPException e) {
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

        startSocksServer(file, backend, jid);
        }
      }
             
      backend.send(new InfoQuery(jid,"set",backend.getIdentifier(),new Socks5Extension(sid,streamHosts)),
    new IQResultListener()
    {
      public void iqResult(InfoQuery iq)
      {
        if(iq.getType().equals("result"))
        {
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

    return !proxies.isEmpty();
  }
 
  private static void getProxyInfo(final Backend backend,JID jid)
  {
    backend.send(new InfoQuery(jid,"get",new Socks5Extension((JID)null,null)), new IQResultListener()
    {
      public void iqResult(InfoQuery iq)
      {
        Socks5Extension s = (Socks5Extension)iq.getIQExtension();
        if(s!=null && s.hasStreamHosts())
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

         
          final SocksSocket s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
    //      TODO get sid?
          final StreamHost chosenStreamHost = streamHost;
          backend.send(new InfoQuery(streamHostID,"set",backend.getIdentifier(),
          new Socks5Extension(sid,targetJID)),new IQResultListener()
          {
            public void iqResult(InfoQuery iq)
            {
              if(iq.getType().equals("result"))sendFile(s);
              else if(iq.getType().equals("error"))
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

      {
        sid = Math.abs(random.nextLong());

                InfoQuery query = RTPBridge.getRTPBridge(connection, String.valueOf(sid));

                connection.send(query, new IQResultListener()
            {
           
              public void iqResult(InfoQuery iq)
              {
                try {
                String localIp;
                        int network;

                        if (iceNegociator.getPublicCandidate() != null) {
                            localIp = iceNegociator.getPublicCandidate().getBase().getAddress().getInetAddress().getHostAddress();
                            network = iceNegociator.getPublicCandidate().getNetwork();
                        }
                        else {
                    localIp = BridgedResolver.getLocalHost();
                            network = 0;
                        }

                           
                RTPBridge rtpBridge = (RTPBridge) iq.getIQExtension();
                  TransportCandidate localCandidate = new ICECandidate(
                        rtpBridge.getIp(), 1, network, String.valueOf(Math.abs(random.nextLong())), rtpBridge.getPortA(), "1", 0, ICECandidate.Type.relay);
                          localCandidate.setLocalIp(localIp);

                          TransportCandidate remoteCandidate = new ICECandidate(
                        rtpBridge.getIp(), 1, network, String.valueOf(Math.abs(random.nextLong())), rtpBridge.getPortB(), "1", 0, ICECandidate.Type.relay);
                          remoteCandidate.setLocalIp(localIp);

                          localCandidate.setSymmetric(remoteCandidate);
                          remoteCandidate.setSymmetric(localCandidate);

                          localCandidate.setPassword(rtpBridge.getPass());
                          remoteCandidate.setPassword(rtpBridge.getPass());

                          localCandidate.setSessionId(rtpBridge.getSid());
                          remoteCandidate.setSessionId(rtpBridge.getSid());

                localCandidate.setConnection(connection);
                remoteCandidate.setConnection(connection);

                          addCandidate(localCandidate);
              }
                    catch (UtilityException e) {
                        e.printStackTrace();
                    }
                    catch (UnknownHostException e) {
                        e.printStackTrace();
                    }
           
              }
           
            },10);
               
//              Get Public Candidate From XMPP Server

                if (iceNegociator.getPublicCandidate() == null) {

                  connection.send(RTPBridge.getPublicIP(connection),new IQResultListener()
                {
               
                  public void iqResult(InfoQuery iq)
                  {
                    RTPBridge response = (RTPBridge) iq.getIQExtension();
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

    menuitem = new JMenuItem(I18N.gettext("vcard.Edit_Details"));
    menuitem.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent arg0)
      {
        backend.send(new InfoQuery("get", new VCard()),new IQResultListener()
        {
          public void iqResult(InfoQuery iq)
          {
            IQExtension iqe = iq.getIQExtension();
            if(iqe instanceof VCard)
View Full Code Here

Examples of nu.fw.jeti.events.IQResultListener

        sid = Math.abs(random.nextLong());

       
        InfoQuery query = RTPBridge.getRTPBridge(connection, String.valueOf(sid));

        connection.send(query, new IQResultListener()
            {
           
              public void iqResult(InfoQuery iq)
              {
          RTPBridge rtpBridge = (RTPBridge)iq.getIQExtension();
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.