Package net.java.sip.communicator.service.protocol

Examples of net.java.sip.communicator.service.protocol.Message


            {
                msgContent = msgBody;
                msgContentType = DEFAULT_MIME_TYPE;
            }

            Message newMessage =
                createMessage(msgContent, msgContentType,
                    DEFAULT_MIME_ENCODING, null);

            Contact sourceContact =
                opSetPersPresence.findContactByID( conversation.getBuddy()
View Full Code Here


     * @param messageText the string content of the message.
     * @return Message the newly created message
     */
    public Message createMessage(String messageText)
    {
        Message msg
            = new MessageJabberImpl(
                messageText,
                OperationSetBasicInstantMessaging.DEFAULT_MIME_TYPE,
                OperationSetBasicInstantMessaging.DEFAULT_MIME_ENCODING,
                null);
View Full Code Here

                             + fromUserName
                             + " the message "
                             + msg.toXML());
            }

            Message newMessage = createMessage(msgBody);

            if(msg.getType() == org.jivesoftware.smack.packet.Message.Type.error)
            {
                if (logger.isInfoEnabled())
                    logger.info("Message error received from " + fromUserName);
View Full Code Here

            rootEl.appendChild(state);
        }
        else // ignore other events
            return;

        Message message =
            opSetBasicIm.createMessage(opSetPersPresence.convertDocument(doc),
                CONTENT_TYPE,
                OperationSetBasicInstantMessaging.DEFAULT_MIME_ENCODING, null);

        //create the message
View Full Code Here

                             + fromUserID
                             + " the message "
                             + msg.toXML());
            }

            Message newMessage = createMessage(msg.getBody());

            //check if the message is available in xhtml
            PacketExtension ext = msg.getExtension(
                            "http://jabber.org/protocol/xhtml-im");
View Full Code Here

            lastReceivedMailboxResultTime = mailboxIQ.getResultTime();

            String newMail = createMailboxDescription(mailboxIQ);

            Message newMailMessage = new MessageJabberImpl(
                newMail, HTML_MIME_TYPE, DEFAULT_MIME_ENCODING, null);

            MessageReceivedEvent msgReceivedEvt = new MessageReceivedEvent(
                newMailMessage, sourceContact, System.currentTimeMillis(),
                MessageReceivedEvent.SYSTEM_MESSAGE_RECEIVED);
View Full Code Here

            }

            Contact to = opSetPersPresence.resolveContactID(
                    toHeader.getAddress().getURI().toString());

            Message failedMessage = null;

            if (to == null) {
                logger.error(
                        "timeout on a message sent to an unknown contact : "
                        + toHeader.getAddress().getURI().toString());
View Full Code Here

            }

            if(cencoding == null)
                cencoding = DEFAULT_MIME_ENCODING;

            Message newMessage = createMessage(content, ctype, cencoding, null);

            if (from == null)
            {
                if (logger.isDebugEnabled())
                    logger.debug("received a message from an unknown contact: "
View Full Code Here

            // we retrieve the original message
            String key = ((CallIdHeader)req.getHeader(CallIdHeader.NAME))
                .getCallId();

            Message newMessage = sentMsg.get(key);

            if (newMessage == null)
            {
                // should never happen
                logger.error("Couldn't find the message sent");
View Full Code Here

    public void testReceiveOfflineMessages()
    {
        String messageText =
            fixture.offlineMsgCollector.getMessageText();

        Message receiveMessage = fixture.offlineMsgCollector.getReceivedMessage();

        assertNotNull("No Offline messages have been received", receiveMessage);
        assertEquals("message body", messageText, receiveMessage.getContent());
    }
View Full Code Here

TOP

Related Classes of net.java.sip.communicator.service.protocol.Message

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.