Java Code Examples for org.jsmpp.bean.NumberingPlanIndicator#valueOf()
The following examples show how to use
org.jsmpp.bean.NumberingPlanIndicator#valueOf() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SMPPServerSimulator.java From jsmpp with Apache License 2.0 | 6 votes |
public DeliveryReceiptTask(SMPPServerSession session, SubmitSm submitSm, MessageId messageId) { this.session = session; this.messageId = messageId; // reversing destination to source sourceAddrTon = TypeOfNumber.valueOf(submitSm.getDestAddrTon()); sourceAddrNpi = NumberingPlanIndicator.valueOf(submitSm.getDestAddrNpi()); sourceAddress = submitSm.getDestAddress(); // reversing source to destination destAddrTon = TypeOfNumber.valueOf(submitSm.getSourceAddrTon()); destAddrNpi = NumberingPlanIndicator.valueOf(submitSm.getSourceAddrNpi()); destAddress = submitSm.getSourceAddr(); totalSubmitted = totalDelivered = 1; shortMessage = submitSm.getShortMessage(); }
Example 2
Source File: SMPPServerSimulator.java From jsmpp with Apache License 2.0 | 6 votes |
public DeliveryReceiptTask(SMPPServerSession session, SubmitMulti submitMulti, MessageId messageId) { this.session = session; this.messageId = messageId; // set to unknown and null, since it was submit_multi sourceAddrTon = TypeOfNumber.UNKNOWN; sourceAddrNpi = NumberingPlanIndicator.UNKNOWN; sourceAddress = null; // reversing source to destination destAddrTon = TypeOfNumber.valueOf(submitMulti.getSourceAddrTon()); destAddrNpi = NumberingPlanIndicator.valueOf(submitMulti.getSourceAddrNpi()); destAddress = submitMulti.getSourceAddr(); // distribution list assumed only contains single address totalSubmitted = totalDelivered = submitMulti.getDestAddresses().length; shortMessage = submitMulti.getShortMessage(); }
Example 3
Source File: DeliveryReceiptTask.java From ogham with Apache License 2.0 | 6 votes |
public DeliveryReceiptTask(SMPPServerSession session, SubmitSm submitSm, MessageId messageId) { this.session = session; this.messageId = messageId; // reversing destination to source sourceAddrTon = TypeOfNumber.valueOf(submitSm.getDestAddrTon()); sourceAddrNpi = NumberingPlanIndicator.valueOf(submitSm.getDestAddrNpi()); sourceAddress = submitSm.getDestAddress(); // reversing source to destination destAddrTon = TypeOfNumber.valueOf(submitSm.getSourceAddrTon()); destAddrNpi = NumberingPlanIndicator.valueOf(submitSm.getSourceAddrNpi()); destAddress = submitSm.getSourceAddr(); totalSubmitted = totalDelivered = 1; shortMessage = submitSm.getShortMessage(); }
Example 4
Source File: DeliveryReceiptTask.java From ogham with Apache License 2.0 | 6 votes |
public DeliveryReceiptTask(SMPPServerSession session, SubmitMulti submitMulti, MessageId messageId) { this.session = session; this.messageId = messageId; // set to unknown and null, since it was submit_multi sourceAddrTon = TypeOfNumber.UNKNOWN; sourceAddrNpi = NumberingPlanIndicator.UNKNOWN; sourceAddress = null; // reversing source to destination destAddrTon = TypeOfNumber.valueOf(submitMulti.getSourceAddrTon()); destAddrNpi = NumberingPlanIndicator.valueOf(submitMulti.getSourceAddrNpi()); destAddress = submitMulti.getSourceAddr(); // distribution list assumed only contains single address totalSubmitted = totalDelivered = submitMulti.getDestAddresses().length; shortMessage = submitMulti.getShortMessage(); }
Example 5
Source File: BindRequest.java From jsmpp with Apache License 2.0 | 5 votes |
public BindRequest(Bind bind, GenericServerResponseHandler responseHandler) { this(bind.getSequenceNumber(), BindType.valueOf(bind.getCommandId()), bind.getSystemId(), bind.getPassword(), bind.getSystemType(), TypeOfNumber.valueOf(bind.getAddrTon()), NumberingPlanIndicator.valueOf(bind.getAddrNpi()), bind.getAddressRange(), InterfaceVersion.valueOf(bind.getInterfaceVersion()), responseHandler); }
Example 6
Source File: JSMPPGateway.java From smslib-v3 with Apache License 2.0 | 5 votes |
private void init() { switch (bindAttributes.getBindType()) { case RECEIVER: bindType = BindType.BIND_RX; setInbound(true); setOutbound(false); break; case TRANSMITTER: bindType = BindType.BIND_TX; setInbound(false); setOutbound(true); break; case TRANSCEIVER: bindType = BindType.BIND_TRX; setInbound(true); setOutbound(true); break; default: IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Unknown BindType " + bindAttributes.getBindType()); Logger.getInstance().logError(illegalArgumentException.getMessage(), illegalArgumentException, getGatewayId()); throw illegalArgumentException; } bindTypeOfNumber = TypeOfNumber.valueOf(bindAttributes.getBindAddress().getTypeOfNumber().value()); bindNumberingPlanIndicator = NumberingPlanIndicator.valueOf(bindAttributes.getBindAddress().getNumberingPlanIndicator().value()); initSession(); }