當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。