Examples of ChatManager


Examples of org.jivesoftware.smack.ChatManager

            }
        } catch (XMPPException e) {
            throw new RuntimeException("Could not connect to XMPP server.", e);
        }

        ChatManager chatManager = connection.getChatManager();
        Chat chat = getOrCreateChat(chatManager);
        Message message = null;
        try {
            message = new Message();
            message.setTo(getParticipant());
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

        }

        for(String toUser : toUsers){

            ChatManager chatmanager = connection.getChatManager();
            Chat chat = chatmanager.createChat(toUser, null);

            try {
                // google bounces back the default message types, you must use chat
                Message msg = new Message(toUser, Message.Type.chat);
                msg.setBody(text);
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

      }
   
     
     
    //initialize the chat manager using connection
    ChatManager chatManager = xmppConnection.getChatManager();
    Chat chat = chatManager.createChat(xmppOutTransportInfo.getDestinationAccount(), null);
   
      boolean waitForResponse =
        msgCtx.getOperationContext() != null &&
        WSDL2Constants.MEP_URI_OUT_IN.equals(
            msgCtx.getOperationContext().getAxisOperation().getMessageExchangePattern());
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

         }else{
           handleException("Could not find message sender details.");
         }        
       
        //initialize the chat manager using connection
        ChatManager chatManager = xmppConnection.getChatManager();
        Chat chat = chatManager.createChat(xmppOutTransportInfo.getDestinationAccount(), null);       
        try{        
            message.setProperty(XMPPConstants.SEQUENCE_ID,
                    xmppOutTransportInfo.getSequenceID());
           message.setBody(responseMsg);   
          chat.sendMessage(message);
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

            }
        } catch (XMPPException e) {
            throw new RuntimeException("Could not connect to XMPP server.", e);
        }

        ChatManager chatManager = connection.getChatManager();
        Chat chat = getOrCreateChat(chatManager);
        Message message = null;
        try {
            message = new Message();
            message.setTo(getParticipant());
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

        } catch (XMPPException e) {
            throw new RuntimeExchangeException("Cannot connect to: "
                    + XmppEndpoint.getConnectionMessage(connection), exchange, e);
        }

        ChatManager chatManager = connection.getChatManager();

        if (LOG.isTraceEnabled()) {
            LOG.trace("Looking for existing chat instance with thread ID " + endpoint.getChatId());
        }
        Chat chat = chatManager.getThreadChat(endpoint.getChatId());
        if (chat == null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Creating new chat instance with thread ID " + endpoint.getChatId());
            }
            chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Received and discarding message from " + getParticipant() + " : " + message.getBody());
                    }
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

    boolean success = false;
   
    try {
      XMPPConnection conn = XMPPConnect.getConnection();

      ChatManager chatmanager = ChatManager.getInstanceFor(conn);
      Chat newChat = chatmanager.createChat(to, null);

      try {
        while(message.length()>=2000) {
          newChat.sendMessage(message.substring(0, 2000));
          message = message.substring(2000);
View Full Code Here

Examples of org.jivesoftware.smack.ChatManager

    try {
      XMPPConnection conn = XMPPConnect.getConnection();

      if (attachmentUrl == null) {
        // send a normal message without an attachment
        ChatManager chatmanager = ChatManager.getInstanceFor(conn);
        Chat newChat = chatmanager.createChat(to, new MessageListener() {
          public void processMessage(Chat chat, Message message) {
            logger.debug("Received message on XMPP: {}", message.getBody());
          }
        });
        try {
View Full Code Here

Examples of org.pokenet.server.feature.ChatManager

   
    /*
         * Start the chat managers
         */
        for(int i = 0; i < m_chatManager.length; i++) {
                m_chatManager[i] = new ChatManager();
                m_chatManager[i].start();
        }
       
    /*
     * Bind the TCP port
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.