Package org.jsmpp.util

Examples of org.jsmpp.util.TimeFormatter


       
        // this is how to write "house" in arabic
        String house = "\u0628" + "\u064e" + "\u064a" +
                        "\u0652" + "\u067a" + "\u064f";
       
        TimeFormatter timeFormatter = new RelativeTimeFormatter();
       
       
        // 4. Specify the data coding using UCS2
        DataCoding dataCoding = new GeneralDataCoding(Alphabet.ALPHA_UCS2, MessageClass.CLASS1, false);
       
        // 5. UTF-16BE is equals to UCS2
        byte[] data = house.getBytes("UTF-16BE");
       
        // 6. Submit the short message
        String messageId = session.submitShortMessage("CMT",
                TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN,
                "1616", TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN,
                "628176504657", new ESMClass(), (byte)0, (byte)1
                timeFormatter.format(new Date()), null,
                new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT), (byte)0,
                dataCoding,
                (byte)0, data);
    }
View Full Code Here


    AbstractMessageChannel outputChannel = TestUtils.getPropertyValue(gateway, "outputChannel", AbstractMessageChannel.class);
    assertEquals("out", outputChannel.getComponentName());

    // this is not set, should be default value
    TimeFormatter timeFormatter = TestUtils.getPropertyValue(gateway, "timeFormatter", TimeFormatter.class);
    assertNotNull(timeFormatter);
  }
View Full Code Here

    String sourceAddress = TestUtils.getPropertyValue(gateway, "defaultSourceAddress", String.class);
    assertEquals("12345", sourceAddress);

    // this is not set, should be default value
    TimeFormatter timeFormatter = TestUtils.getPropertyValue(gateway, "timeFormatter", TimeFormatter.class);
    assertNotNull(timeFormatter);

    // I send message
    Message<String> message = MessageBuilder.withPayload("Yuhuu !!! i am connected using Spring Integration namespace")
        .setHeader(SmppConstants.SRC_ADDR, "pavel")
View Full Code Here

TOP

Related Classes of org.jsmpp.util.TimeFormatter

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.