Package org.jivesoftware.smack.packet

Examples of org.jivesoftware.smack.packet.Message.toXML()


        xmppClientSidePacketListener = new XMPPClientSidePacketListener(msgCtx);
        xmppConnection.addPacketListener(xmppClientSidePacketListener,filter);
      }     

      chat.sendMessage(message);
      log.debug("Sent message :"+message.toXML());

      //If this is on client side, wait for the response from server.
      //Is this the best way to do this?
      if(waitForResponse && !msgCtx.isServerSide()){
        //TODO : need to add a timeout
View Full Code Here


        }
        xmppConnection.disconnect();
      }

    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    }finally{
      if(!msgCtx.isServerSide()){
        xmppConnection.disconnect();
      }
View Full Code Here

        xmppConnection.disconnect();
      }

    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    }finally{
      if(!msgCtx.isServerSide()){
        xmppConnection.disconnect();
      }
    }
View Full Code Here

        ChatManager chatManager = xmppConnection.getChatManager();
        Chat chat = chatManager.createChat(xmppOutTransportInfo.getDestinationAccount(), null);       
        try{        
           message.setBody(responseMsg);   
          chat.sendMessage(message);
          log.debug("Sent message :"+message.toXML());
        } catch (XMPPException e) {
          XMPPSender.handleException("Error occurred while sending the message : "+message.toXML(),e);
        }
        } 
View Full Code Here

        try{        
           message.setBody(responseMsg);   
          chat.sendMessage(message);
          log.debug("Sent message :"+message.toXML());
        } catch (XMPPException e) {
          XMPPSender.handleException("Error occurred while sending the message : "+message.toXML(),e);
        }
        } 

    /**
     * Extract connection details from axis2.xml's transportsender section
View Full Code Here

        xmppClientSidePacketListener.listenForResponse(key, msgCtx);
        message.setProperty(XMPPConstants.SEQUENCE_ID, key);
      }     

      chat.sendMessage(message);
      log.debug("Sent message :"+message.toXML());

      //If this is on client side, wait for the response from server.
      //Is this the best way to do this?
      if(waitForResponse && !msgCtx.isServerSide()){
          xmppClientSidePacketListener.waitFor(key);
View Full Code Here

          log.debug("Received response sucessfully");
      }
     

    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    } catch (InterruptedException e) {
        log.error("Error occurred while sending the message : "+message.toXML(),e);
            handleException("Error occurred while sending the message : "+message.toXML(),e);
        }finally{
View Full Code Here

      }
     

    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    } catch (InterruptedException e) {
        log.error("Error occurred while sending the message : "+message.toXML(),e);
            handleException("Error occurred while sending the message : "+message.toXML(),e);
        }finally{
//      if(xmppConnection != null && !msgCtx.isServerSide()){
View Full Code Here

    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    } catch (InterruptedException e) {
        log.error("Error occurred while sending the message : "+message.toXML(),e);
            handleException("Error occurred while sending the message : "+message.toXML(),e);
        }finally{
//      if(xmppConnection != null && !msgCtx.isServerSide()){
//        xmppConnection.disconnect();
//      }
View Full Code Here

    } catch (XMPPException e) {
      log.error("Error occurred while sending the message : "+message.toXML(),e);
      handleException("Error occurred while sending the message : "+message.toXML(),e);
    } catch (InterruptedException e) {
        log.error("Error occurred while sending the message : "+message.toXML(),e);
            handleException("Error occurred while sending the message : "+message.toXML(),e);
        }finally{
//      if(xmppConnection != null && !msgCtx.isServerSide()){
//        xmppConnection.disconnect();
//      }
    }
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.