本文整理汇总了Java中org.jsmpp.bean.SubmitMulti类的典型用法代码示例。如果您正苦于以下问题:Java SubmitMulti类的具体用法?Java SubmitMulti怎么用?Java SubmitMulti使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SubmitMulti类属于org.jsmpp.bean包,在下文中一共展示了SubmitMulti类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: copySubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public static SubmitMulti copySubmitMulti(SubmitMulti src) {
SubmitMulti dest = new SubmitMulti();
dest.setCommandId(src.getCommandId());
dest.setCommandLength(src.getCommandLength());
dest.setCommandStatus(src.getCommandStatus());
dest.setDataCoding(src.getDataCoding());
dest.setDestAddresses(src.getDestAddresses());
dest.setEsmClass(src.getEsmClass());
dest.setOptionalParameters(src.getOptionalParameters());
dest.setPriorityFlag(src.getPriorityFlag());
dest.setProtocolId(src.getProtocolId());
dest.setRegisteredDelivery(src.getRegisteredDelivery());
dest.setReplaceIfPresentFlag(src.getReplaceIfPresentFlag());
dest.setScheduleDeliveryTime(src.getScheduleDeliveryTime());
dest.setSequenceNumber(src.getSequenceNumber());
dest.setServiceType(src.getServiceType());
dest.setShortMessage(src.getShortMessage());
dest.setSmDefaultMsgId(src.getSmDefaultMsgId());
dest.setSourceAddr(src.getSourceAddr());
dest.setSourceAddrNpi(src.getSourceAddrNpi());
dest.setSourceAddrTon(src.getSourceAddrTon());
dest.setValidityPeriod(src.getValidityPeriod());
return dest;
}
示例2: DeliveryReceiptTask
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
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();
}
示例3: DeliveryReceiptTask
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
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();
}
示例4: fireAcceptSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
private SubmitMultiResult fireAcceptSubmitMulti(SubmitMulti submitMulti) throws ProcessRequestException {
if (messageReceiverListener != null) {
return messageReceiverListener.onAcceptSubmitMulti(submitMulti, this);
}
logger.warn(MESSAGE_RECEIVER_LISTENER_IS_NULL);
throw new ProcessRequestException(NO_MESSAGE_RECEIVER_LISTENER_REGISTERED,
SMPPConstant.STAT_ESME_RX_R_APPN);
}
示例5: processSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMultiResult processSubmitMulti(SubmitMulti submitMulti)
throws ProcessRequestException {
try {
return fireAcceptSubmitMulti(submitMulti);
} catch(Exception e) {
String msg = "Invalid runtime exception thrown when processing SubmitMultiSm";
logger.error(msg, e);
throw new ProcessRequestException(msg, SMPPConstant.STAT_ESME_RSYSERR);
}
}
示例6: onAcceptSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMultiResult onAcceptSubmitMulti(SubmitMulti submitMulti, SMPPServerSession source)
throws ProcessRequestException {
MessageId messageId = messageIDGenerator.newMessageId();
LOGGER.debug("Receiving submit_multi_sm '{}', and return message id {}",
new String(submitMulti.getShortMessage()), messageId);
if (SMSCDeliveryReceipt.FAILURE.containedIn(submitMulti.getRegisteredDelivery())
|| SMSCDeliveryReceipt.SUCCESS_FAILURE.containedIn(submitMulti.getRegisteredDelivery())) {
execServiceDelReceipt.execute(new DeliveryReceiptTask(source, submitMulti, messageId));
}
return new SubmitMultiResult(messageId.getValue(), new UnsuccessDelivery[0]);
}
示例7: onAcceptSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMultiResult onAcceptSubmitMulti(SubmitMulti submitMulti, SMPPServerSession source) throws ProcessRequestException {
MessageId messageId = messageIDGenerator.newMessageId();
LOG.debug("Receiving submit_multi_sm '{}', and return message id {}", new String(submitMulti.getShortMessage()), messageId);
if (SMSCDeliveryReceipt.DEFAULT.containedIn(submitMulti.getRegisteredDelivery()) || SMSCDeliveryReceipt.SUCCESS_FAILURE.containedIn(submitMulti.getRegisteredDelivery())) {
execServiceDelReceipt.execute(new DeliveryReceiptTask(source, submitMulti, messageId));
}
return new SubmitMultiResult(messageId.getValue(), new UnsuccessDelivery[0]);
}
示例8: onAcceptSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
SubmitMultiResult onAcceptSubmitMulti(SubmitMulti submitMulti,
SMPPServerSession source) throws ProcessRequestException;
示例9: submitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
SubmitMulti submitMulti(byte[] data) throws PDUStringException,
InvalidNumberOfDestinationsException;
示例10: submitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMulti submitMulti(byte[] data) throws PDUStringException,
InvalidNumberOfDestinationsException {
SubmitMulti req = new SubmitMulti();
SequentialBytesReader reader = new SequentialBytesReader(data);
assignHeader(req, reader);
req.setServiceType(reader.readCString());
StringValidator.validateString(req.getServiceType(),
StringParameter.SERVICE_TYPE);
req.setSourceAddrTon(reader.readByte());
req.setSourceAddrNpi(reader.readByte());
req.setSourceAddr(reader.readCString());
StringValidator.validateString(req.getSourceAddr(),
StringParameter.SOURCE_ADDR);
int totalDest = 0xff & reader.readByte();
if (totalDest > 255) {
throw new InvalidNumberOfDestinationsException(
"Number of destination is invalid. Should be no more than 255. Actual number is "
+ totalDest, totalDest);
}
DestinationAddress[] destAddresses = new DestinationAddress[totalDest];
for (int i = 0; i < totalDest; i++) {
byte flag = reader.readByte();
if (flag == Flag.SME_ADDRESS.getValue()) {
byte ton = reader.readByte();
byte npi = reader.readByte();
String addr = reader.readCString();
StringValidator.validateString(addr,
StringParameter.DESTINATION_ADDR);
Address destAddr = new Address(ton, npi, addr);
destAddresses[i] = destAddr;
} else if (flag == Flag.DISTRIBUTION_LIST.getValue()) {
destAddresses[i] = new DistributionList(reader.readCString());
} else {
logger.warn("Unknown destination address flag: {}", flag);
}
}
req.setDestAddresses(destAddresses);
req.setEsmClass(reader.readByte());
req.setProtocolId(reader.readByte());
req.setPriorityFlag(reader.readByte());
req.setScheduleDeliveryTime(reader.readCString());
StringValidator.validateString(req.getScheduleDeliveryTime(),
StringParameter.SCHEDULE_DELIVERY_TIME);
req.setValidityPeriod(reader.readCString());
StringValidator.validateString(req.getValidityPeriod(),
StringParameter.VALIDITY_PERIOD);
req.setRegisteredDelivery(reader.readByte());
req.setReplaceIfPresentFlag(reader.readByte());
req.setDataCoding(reader.readByte());
req.setSmDefaultMsgId(reader.readByte());
byte smLength = reader.readByte();
req.setShortMessage(reader.readBytes(smLength));
StringValidator.validateString(req.getShortMessage(),
StringParameter.SHORT_MESSAGE);
req.setOptionalParameters(readOptionalParameters(reader));
return req;
}
示例11: processSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMultiResult processSubmitMulti(SubmitMulti submitMulti)
throws ProcessRequestException {
return null;
}
示例12: onAcceptSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMultiResult onAcceptSubmitMulti(SubmitMulti submitMulti,
SMPPServerSession source) throws ProcessRequestException {
LOGGER.warn("SubmitMulti not implemented");
throw new ProcessRequestException(SUBMITMULTI_NOT_IMPLEMENTED, SMPPConstant.STAT_ESME_RSYSERR);
}
示例13: processSubmitMulti
import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
SubmitMultiResult processSubmitMulti(SubmitMulti submitMulti) throws ProcessRequestException;