Package net.gescobar.smppserver

Examples of net.gescobar.smppserver.SmppSession


      String from = "3002175604";
      String text = "this is a test";

      // retrieve the session
      Assert.assertEquals(server.getSessions().size(), 1);
      SmppSession session = server.getSessions().iterator().next();
      Assert.assertNotNull(session);

      // create and send the request
      DeliverSm deliverSM = new DeliverSm();
      deliverSM.setDestAddress(new Address((byte) 0, (byte) 0, to));
      deliverSM.setSourceAddress(new Address((byte) 0, (byte) 0, from));
      deliverSM.setShortMessage(text.getBytes());

      session.sendRequest(deliverSM);

      long timeout = 2000;
      if (!receiveMessage(messageProducer, timeout)) {
        Assert.fail("the message was not received");
      }
View Full Code Here


      message.setProperty("receiptDestination", "test");
      sendMessage(connector, messageStore, message);

      // retrieve the session
      Assert.assertEquals(server.getSessions().size(), 1);
      SmppSession session = server.getSessions().iterator().next();
      Assert.assertNotNull(session);

      DeliverSm deliverSM = new DeliverSm();
      deliverSM.setEsmClass(SmppConstants.ESM_CLASS_MT_SMSC_DELIVERY_RECEIPT);
      deliverSM.setDestAddress(new Address((byte) 0, (byte) 0, from));
      deliverSM.setSourceAddress(new Address((byte) 0, (byte) 0, to));
      deliverSM.setShortMessage("id:12000 sub:1 dlvrd:1 submit date:1101010000 done date:1101010000 stat:DELIVRD err:0 text:This is a ... ".getBytes());

      session.sendRequest(deliverSM);

      long timeout = 2000;
      if (!receiveMessage(messageProducer, timeout)) {
        Assert.fail("the delivery receipt was not received");
      }
View Full Code Here

      message.setProperty("receiptDestination", "test");
      sendMessage(connector, messageStore, message);

      // retrieve the session
      Assert.assertEquals(server.getSessions().size(), 1);
      SmppSession session = server.getSessions().iterator().next();
      Assert.assertNotNull(session);

      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"));
      deliverSM.setShortMessage("id:16fee0e525 sub:1 dlvrd:1 submit date:1101010000 done date:1101010000 stat:DELIVRD err:0 text:This is a ... ".getBytes());

      session.sendRequest(deliverSM);

      long timeout = 2000;
      if (!receiveMessage(messageProducer, timeout)) {
        Assert.fail("the delivery receipt was not received");
      }
View Full Code Here

      message.setProperty("receiptDestination", "test");
      sendMessage(connector, messageStore, message);

      // retrieve the session
      Assert.assertEquals(server.getSessions().size(), 1);
      SmppSession session = server.getSessions().iterator().next();
      Assert.assertNotNull(session);

      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"));
      deliverSM.setShortMessage("id:98765432101 sub:1 dlvrd:1 submit date:1101010000 done date:1101010000 stat:DELIVRD err:0 text:This is a ... ".getBytes());

      session.sendRequest(deliverSM);

      long timeout = 2000;
      if (!receiveMessage(messageProducer, timeout)) {
        Assert.fail("the delivery receipt was not received");
      }
View Full Code Here

      deliverSm.setSourceAddress(new Address((byte) 0, (byte) 0, "3542"));
      deliverSm.setShortMessage("id:12000 sub:1 dlvrd:1 submit date:1101010000 done date:1101010000 stat:DELIVRD err:0 text:This is a ... ".getBytes());

      // retrieve the session
      Assert.assertEquals(server.getSessions().size(), 1);
      SmppSession session = server.getSessions().iterator().next();
      Assert.assertNotNull(session);

      // send the delivery receipt
      session.sendRequest(deliverSm);

      long timeout = 2000;
      if (receiveMessage(messageProducer, timeout)) {
        Assert.fail("the message was received");
      }
View Full Code Here

TOP

Related Classes of net.gescobar.smppserver.SmppSession

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.