Package com.volantis.mps.message

Examples of com.volantis.mps.message.MultiChannelMessageImpl


                    characterSet
            );
        }

        if (!(url.equals(""))) {
            message = new MultiChannelMessageImpl(new URL(url), subject, characterSet);
        } else {
            String xml = request.getParameter("xml");
            if (characterSet != null) {
                // convert from request char set to specified charset
                xml = ContentUtilities.convertEncoding(
                        xml,
                        requestEncoding,
                        characterSet
                );
            }
            message = new MultiChannelMessageImpl(xml, subject, characterSet);
        }

        try {
            message.addAttachments(getAttachments(request));
        } catch (Exception ee) {
View Full Code Here


                        return !( paramString.startsWith ( "PhoneNumber=%2B44failure" ) );
                    }
                };

        // Create a test message
        MultiChannelMessage multiChannelMessage = new MultiChannelMessageImpl();
        // Unless overriding MultiChannelMessage#generateTargetMessageAsURL
        // then just use a URL based message for these tests otherwise it
        // will try and initialise a servlet and get very upset with life!
        multiChannelMessage.setMessageURL ( new URL ( "http://test.message/file" ) );
        multiChannelMessage.setSubject ( "Test Message" );

        // Create some recipients
        MessageRecipients messageRecipients = createTestRecipients ();

        // Create a sender
View Full Code Here

        NowSMSWAPPushChannelAdapter channel =
                ( NowSMSWAPPushChannelAdapter ) getTestInstance ();

        // Create a test MultiChannelMessage to return a URL without
        // trying to use a servlet or ...
        MultiChannelMessage multiChannelMessage = new MultiChannelMessageImpl () {
            public URL generateTargetMessageAsURL ( String deviceName,
                                                    String mssUrl )
                    throws MessageException {
                URL url = null;
                try {
View Full Code Here

    public static final String SYNC_BINDTYPE = "sync";

    public void setUp() throws Exception {
        super.setUp();

        message = new MultiChannelMessageImpl("http://localhost:8080/dummy",
                "Test message");
        recipients = new MessageRecipients();
        MessageRecipient recipient = new MessageRecipient(
                new InternetAddress("recipient@volantis.com"), "PC");
        recipients.addRecipient(recipient);
View Full Code Here

            // a string representing the XDIME to be sent.  If the
            // given message has some content set then this will be
            // used in favour of a URL source.

            if (message.getContent() != null) {
                toBeSent = new MultiChannelMessageImpl();
                try {
                    toBeSent.setMessage(message.getContent());
                    toBeSent.setCharacterEncoding(message.getCharacterEncoding());
                    toBeSent.setSubject(message.getSubject());
                } catch (MessageException e) {
                    throw new MessageServiceException(e);
                }
            } else {
               toBeSent = new MultiChannelMessageImpl(
                    message.getURL(),
                    message.getSubject(),
                    message.getCharacterEncoding());
            }
View Full Code Here

TOP

Related Classes of com.volantis.mps.message.MultiChannelMessageImpl

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.