Package org.mokai.persist

Examples of org.mokai.persist.MessageStore


    configuration.setHost("localhost");
    configuration.setPort(SERVER_PORT);
    configuration.setSystemId("test");
    configuration.setPassword("test");

    MessageStore messageStore = new MockMessageStore();

    SmppConnector connector = new SmppConnector(configuration);
    injectResource(new MockProcessorContext(), connector);
    injectResource(messageStore, connector);
    injectResource(messageProducer, connector);
    connector.doStart();
    waitUntilStatus(connector, DEFAULT_TIMEOUT, Status.OK);

    try {
      Message message = new Message();
      message.setProperty("to", "3542");
      message.setProperty("from", "3002175604");
      message.setProperty("text", "This is the test");
      message.setProperty("sequenceNumber", 1);
      message.setProperty("messageId", "12000");
      message.setProperty("commandStatus", 0);

      messageStore.saveOrUpdate(message);

      DeliverSm deliverSm = new DeliverSm();
      deliverSm.setEsmClass(SmppConstants.ESM_CLASS_MT_SMSC_DELIVERY_RECEIPT);
      deliverSm.setDestAddress(new Address((byte) 0, (byte) 0, "3002175604"));
      deliverSm.setSourceAddress(new Address((byte) 0, (byte) 0, "3542"));
View Full Code Here

TOP

Related Classes of org.mokai.persist.MessageStore

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.