Package org.jsmpp.bean

Examples of org.jsmpp.bean.BindType


        PDUComposer composer = new DefaultComposer();
        PDUDecomposer decomposer = new DefaultDecomposer();
       
        byte[] b = null;
        String systemId = "smsc";
        BindType bindType = BindType.BIND_TRX;
        try {
            b = composer.bindResp(bindType.responseCommandId(), 1, systemId);
            assertEquals(b.length, 16 + systemId.length() + 1);
            printLog("Length of bytes : " + b.length);
        } catch (PDUStringException e) {
            fail("Failed composing bind response", e);
        }
       
        try {
            BindResp resp = decomposer.bindResp(b);
            assertEquals(resp.getCommandLength(), b.length);
            assertEquals(resp.getCommandId(), bindType.responseCommandId());
            assertEquals(resp.getCommandStatus(), SMPPConstant.STAT_ESME_ROK);
            assertEquals(resp.getSequenceNumber(), 1);
            assertEquals(resp.getSystemId(), systemId);
        } catch (PDUStringException e) {
            fail("Failed decomposing bind response", e);
View Full Code Here


    Assert.assertTrue("the " + ExtendedSmppSession.class.getName() + " should be started if the " +
        "container supports Lifecycle, otherwise, it must be manually #start'd",
        (smppSession).isRunning());

    BindType bindType = smppSession.getBindType();

    Assert.assertNotNull("the bind type should not be null", bindType);
  }
View Full Code Here

TOP

Related Classes of org.jsmpp.bean.BindType

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.