Package nu.fw.jeti.jabber.elements

Examples of nu.fw.jeti.jabber.elements.Packet


          packetReceiver.streamError(packet);
          break;
        }
        */
        try{
          Packet packet = packetHandeler.build();
          Log.xmlPacket(packet);
          packetReceiver.receivePackets(packet);
        }catch(InstantiationException e){Log.xmlParseException(e);}
        catch (UnsupportedOperationException e)
        {//only way to stop xml parser
View Full Code Here


    authenticated = true;
  }

    public final void run()
    {
      Packet packet;
    while ((isRunning) || (!queue.isEmpty()))
    {
      synchronized(queue)
      {
        if (queue.isEmpty())
        {
          if(isRunning)
          {
            try
            {
              queue.wait(KEEP_ALIVE);
            }
            catch(InterruptedException e)
            {
              e.printStackTrace();
              return;
            }
            if(authenticated && queue.isEmpty()) queue.add(keepAlivePacket);
          }
          continue;
        }
        else packet =(Packet) queue.removeFirst();
      }
      //send packet
      String xml = packet.toString();
      try
      {
        nu.fw.jeti.util.Log.sendXML(xml);
        out.write(xml);
        out.flush();
View Full Code Here

        {
          JOptionPane.showMessageDialog(LogWindow.this,I18N.gettext("main.log.For_security_reasons_it_is_not_possible_to_remove_accounts,_please_use_the_jeti_functions_for_that"));
        }
        else if(!txtXMLSend.getText().equals(""))
        {
          backend.send(new Packet()
          {
            public void appendToXML(StringBuffer xml)
            {
              xml.append(txtXMLSend.getText());
              txtXMLSend.setText("");
View Full Code Here

      connect.sendLoginError("Sasl challenge failed, no saslclient");
      return;
    }
    try {
      final byte[] response = saslClient.evaluateChallenge(Base64.decode(challenge.getChallenge()));
       connect.sendWhileConnecting(new Packet()
           {
        public void appendToXML(StringBuffer xml)
        {
          xml.append("<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>");
          if(response!=null)xml.append(Base64.encodeBytes(response));
View Full Code Here

TOP

Related Classes of nu.fw.jeti.jabber.elements.Packet

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.