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


Java SubmitMulti类代码示例

本文整理汇总了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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:25,代码来源:SmppUtils.java

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

示例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();
}
 
开发者ID:groupe-sii,项目名称:ogham,代码行数:20,代码来源:DeliveryReceiptTask.java

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

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

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

示例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]);
}
 
开发者ID:groupe-sii,项目名称:ogham,代码行数:10,代码来源:JSMPPServerSimulator.java

示例8: onAcceptSubmitMulti

import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
SubmitMultiResult onAcceptSubmitMulti(SubmitMulti submitMulti,
SMPPServerSession source) throws ProcessRequestException;
 
开发者ID:opentelecoms-org,项目名称:jsmpp,代码行数:3,代码来源:ServerMessageReceiverListener.java

示例9: submitMulti

import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
SubmitMulti submitMulti(byte[] data) throws PDUStringException,
InvalidNumberOfDestinationsException;
 
开发者ID:opentelecoms-org,项目名称:jsmpp,代码行数:3,代码来源:PDUDecomposer.java

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

示例11: processSubmitMulti

import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
public SubmitMultiResult processSubmitMulti(SubmitMulti submitMulti)
        throws ProcessRequestException {
    return null;
}
 
开发者ID:opentelecoms-org,项目名称:jsmpp,代码行数:5,代码来源:DummyResponseHandler.java

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

示例13: processSubmitMulti

import org.jsmpp.bean.SubmitMulti; //导入依赖的package包/类
SubmitMultiResult processSubmitMulti(SubmitMulti submitMulti) throws ProcessRequestException; 
开发者ID:opentelecoms-org,项目名称:jsmpp,代码行数:2,代码来源:ServerResponseHandler.java


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