use of org.jsmpp.session.SMPPSession in project camel by apache.
the class SmppConsumer method createSession.
private SMPPSession createSession() throws IOException {
SMPPSession session = createSMPPSession();
session.setEnquireLinkTimer(configuration.getEnquireLinkTimer());
session.setTransactionTimer(configuration.getTransactionTimer());
session.addSessionStateListener(internalSessionStateListener);
session.setMessageReceiverListener(messageReceiverListener);
session.connectAndBind(this.configuration.getHost(), this.configuration.getPort(), new BindParameter(BindType.BIND_RX, this.configuration.getSystemId(), this.configuration.getPassword(), this.configuration.getSystemType(), TypeOfNumber.UNKNOWN, NumberingPlanIndicator.UNKNOWN, configuration.getAddressRange()));
return session;
}
use of org.jsmpp.session.SMPPSession in project camel by apache.
the class AbstractSmppCommandTest method setUp.
@Before
public void setUp() {
session = new SMPPSession();
config = new SmppConfiguration();
command = new AbstractSmppCommand(session, config) {
@Override
public void execute(Exchange exchange) throws SmppException {
}
};
}
use of org.jsmpp.session.SMPPSession in project camel by apache.
the class SmppBindingTest method createSmppDataSmCommand.
@Test
public void createSmppDataSmCommand() {
SMPPSession session = new SMPPSession();
Exchange exchange = new DefaultExchange(new DefaultCamelContext());
exchange.getIn().setHeader(SmppConstants.COMMAND, "DataSm");
SmppCommand command = binding.createSmppCommand(session, exchange);
assertTrue(command instanceof SmppDataSmCommand);
}
use of org.jsmpp.session.SMPPSession in project camel by apache.
the class SmppBindingTest method createSmppSubmitMultiCommand.
@Test
public void createSmppSubmitMultiCommand() {
SMPPSession session = new SMPPSession();
Exchange exchange = new DefaultExchange(new DefaultCamelContext());
exchange.getIn().setHeader(SmppConstants.COMMAND, "SubmitMulti");
SmppCommand command = binding.createSmppCommand(session, exchange);
assertTrue(command instanceof SmppSubmitMultiCommand);
}
use of org.jsmpp.session.SMPPSession in project wso2-axis2-transports by wso2.
the class SMPPImplManager method start.
public void start() {
inSession = new SMPPSession();
try {
inSession.connectAndBind(smppTransportInDetails.getHost(), smppTransportInDetails.getPort(), new BindParameter(BindType.BIND_RX, smppTransportInDetails.getSystemId(), smppTransportInDetails.getPassword(), smppTransportInDetails.getSystemType(), TypeOfNumber.UNKNOWN, NumberingPlanIndicator.UNKNOWN, null));
SMPPListener listener = new SMPPListener(smsInManeger);
inSession.setMessageReceiverListener(listener);
stop = false;
System.out.println(" [Axis2] bind and connect to " + smppTransportInDetails.getHost() + " : " + smppTransportInDetails.getPort() + " on SMPP Transport");
} catch (IOException e) {
log.error("Unable to conncet" + e);
}
}
Aggregations