当前位置: 首页>>代码示例>>Java>>正文


Java SubmitMulti.setScheduleDeliveryTime方法代码示例

本文整理汇总了Java中org.jsmpp.bean.SubmitMulti.setScheduleDeliveryTime方法的典型用法代码示例。如果您正苦于以下问题:Java SubmitMulti.setScheduleDeliveryTime方法的具体用法?Java SubmitMulti.setScheduleDeliveryTime怎么用?Java SubmitMulti.setScheduleDeliveryTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jsmpp.bean.SubmitMulti的用法示例。


在下文中一共展示了SubmitMulti.setScheduleDeliveryTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:25,代码来源:SmppUtils.java

示例2: 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;
}
 
开发者ID:opentelecoms-org,项目名称:jsmpp,代码行数:62,代码来源:DefaultDecomposer.java


注:本文中的org.jsmpp.bean.SubmitMulti.setScheduleDeliveryTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。