Examples of sendPdu()


Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

                }

                Assert.assertEquals(3, session.getSendWindow().getSize());

                // now the smsc will send a response back to the second request
                simulator0.sendPdu(el1Resp);

                // wait for the response to make its way back in
                future1.await();

                // there should be 1 slot free now in the window
View Full Code Here

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

                // this request should now succeed
                WindowFuture future3 = session.sendRequestPdu(el3, 3000, true);

                // send back responses for everything that's missing
                simulator0.sendPdu(el2Resp);
                simulator0.sendPdu(el0Resp);
                simulator0.sendPdu(el3Resp);

                // make sure they all finished
                future0.await();
View Full Code Here

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

                // this request should now succeed
                WindowFuture future3 = session.sendRequestPdu(el3, 3000, true);

                // send back responses for everything that's missing
                simulator0.sendPdu(el2Resp);
                simulator0.sendPdu(el0Resp);
                simulator0.sendPdu(el3Resp);

                // make sure they all finished
                future0.await();
                future1.await();
View Full Code Here

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

                WindowFuture future3 = session.sendRequestPdu(el3, 3000, true);

                // send back responses for everything that's missing
                simulator0.sendPdu(el2Resp);
                simulator0.sendPdu(el0Resp);
                simulator0.sendPdu(el3Resp);

                // make sure they all finished
                future0.await();
                future1.await();
                future2.await();
View Full Code Here

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

            // send asynchronously (no response will be received yet)
            session.sendRequestPdu(el0, 2000, false);

            // send the response back -- this should be routed as n ExpectedPduResponse....
            simulator0.sendPdu(el0Resp);

            // we should have received a PDU response
            PduAsyncResponse asyncpdu0 = sessionHandler.getReceivedExpectedPduResponses().poll(1000, TimeUnit.MILLISECONDS);
            PduResponse pdu0 = asyncpdu0.getResponse();
            Assert.assertNotNull("Unable to receive expected PDU response -- perhaps it was routed incorrectly?", pdu0);
View Full Code Here

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

            future.cancel();

            Assert.assertEquals(WindowFuture.CALLER_WAITING_TIMEOUT, future.getCallerStateHint());
           
            // send a response now after the caller would have timed out
            simulator0.sendPdu(el0Resp);

            // we should have received an unexpected PDU response
            Assert.assertEquals(0, sessionHandler.getReceivedPduRequests().size());
            Assert.assertEquals(0, sessionHandler.getReceivedExpectedPduResponses().size());
            PduResponse pdu0 = sessionHandler.getReceivedUnexpectedPduResponses().poll(1000, TimeUnit.MILLISECONDS);
View Full Code Here

Examples of com.cloudhopper.smpp.simulator.SmppSimulatorSessionHandler.sendPdu()

            EnquireLink el0 = new EnquireLink();
            el0.setSequenceNumber(0x1000);
            EnquireLinkResp el0Resp = el0.createResponse();

            // send a response to a request that was NEVER sent
            simulator0.sendPdu(el0Resp);

            // we should have received a PDU response
            PduResponse pdu0 = sessionHandler.getReceivedUnexpectedPduResponses().poll(1000, TimeUnit.MILLISECONDS);
            Assert.assertNotNull("Unable to receive unexpected PDU response -- perhaps it was routed incorrectly?", pdu0);
            Assert.assertEquals(SmppConstants.CMD_ID_ENQUIRE_LINK_RESP, pdu0.getCommandId());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.