Package org.jsmpp.bean

Examples of org.jsmpp.bean.SubmitMulti


    public void execute(Exchange exchange) throws SmppException {
        SubmitMulti[] submitMulties = createSubmitMulti(exchange);
        List<SubmitMultiResult> results = new ArrayList<SubmitMultiResult>(submitMulties.length);
       
        for (int i = 0; i < submitMulties.length; i++) {
            SubmitMulti submitMulti = submitMulties[i];
            SubmitMultiResult result;
            log.debug("Sending multiple short messages for exchange id '{}'...", exchange.getExchangeId());
           
            try {
                result = session.submitMultiple(
                        submitMulti.getServiceType(),
                        TypeOfNumber.valueOf(submitMulti.getSourceAddrTon()),
                        NumberingPlanIndicator.valueOf(submitMulti.getSourceAddrNpi()),
                        submitMulti.getSourceAddr(),
                        (Address[]) submitMulti.getDestAddresses(),
                        new ESMClass(submitMulti.getEsmClass()),
                        submitMulti.getProtocolId(),
                        submitMulti.getPriorityFlag(),
                        submitMulti.getScheduleDeliveryTime(),
                        submitMulti.getValidityPeriod(),
                        new RegisteredDelivery(submitMulti.getRegisteredDelivery()),
                        new ReplaceIfPresentFlag(submitMulti.getReplaceIfPresentFlag()),
                        new GeneralDataCoding(submitMulti.getDataCoding()),
                        submitMulti.getSmDefaultMsgId(),
                        submitMulti.getShortMessage(),
                        new OptionalParameter[0]);
                results.add(result);
            } catch (Exception e) {
                throw new SmppException(e);
            }
View Full Code Here


            esmClass = new ESMClass(MessageMode.DEFAULT, MessageType.DEFAULT, GSMSpecificFeature.UDHI);
        } else {
            esmClass = new ESMClass();
        }

        SubmitMulti template = createSubmitMultiTemplate(exchange);
        SubmitMulti[] submitMulties = new SubmitMulti[segments.length];
       
        for (int i = 0; i < segments.length; i++) {
            SubmitMulti submitMulti = SmppUtils.copySubmitMulti(template);
            submitMulti.setEsmClass(esmClass.value());
            submitMulti.setDataCoding(dataCoding.value());
            submitMulti.setShortMessage(segments[i]);
            submitMulties[i] = submitMulti;
        }

        return submitMulties;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    protected SubmitMulti createSubmitMultiTemplate(Exchange exchange) {
        Message in = exchange.getIn();
        SubmitMulti submitMulti = new SubmitMulti();

        byte destAddrTon;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_TON)) {
            destAddrTon = in.getHeader(SmppConstants.DEST_ADDR_TON, Byte.class);
        } else {
            destAddrTon = config.getDestAddrTon();
        }

        byte destAddrNpi;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_NPI)) {
            destAddrNpi = in.getHeader(SmppConstants.DEST_ADDR_NPI, Byte.class);
        } else {
            destAddrNpi = config.getDestAddrNpi();
        }

        List<String> destAddresses;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR)) {
            destAddresses = in.getHeader(SmppConstants.DEST_ADDR, List.class);
        } else {
            destAddresses = Arrays.asList(config.getDestAddr());
        }

        Address[] addresses = new Address[destAddresses.size()];
        int addrNum = 0;
        for (String destAddr : destAddresses) {
            Address addr = new Address(destAddrTon, destAddrNpi, destAddr);
            addresses[addrNum++] = addr;
        }
        submitMulti.setDestAddresses(addresses);

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR)) {
            submitMulti.setSourceAddr(in.getHeader(SmppConstants.SOURCE_ADDR, String.class));
        } else {
            submitMulti.setSourceAddr(config.getSourceAddr());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_TON)) {
            submitMulti.setSourceAddrTon(in.getHeader(SmppConstants.SOURCE_ADDR_TON, Byte.class));
        } else {
            submitMulti.setSourceAddrTon(config.getSourceAddrTon());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_NPI)) {
            submitMulti.setSourceAddrNpi(in.getHeader(SmppConstants.SOURCE_ADDR_NPI, Byte.class));
        } else {
            submitMulti.setSourceAddrNpi(config.getSourceAddrNpi());
        }

        if (in.getHeaders().containsKey(SmppConstants.SERVICE_TYPE)) {
            submitMulti.setServiceType(in.getHeader(SmppConstants.SERVICE_TYPE, String.class));
        } else {
            submitMulti.setServiceType(config.getServiceType());
        }

        if (in.getHeaders().containsKey(SmppConstants.REGISTERED_DELIVERY)) {
            submitMulti.setRegisteredDelivery(in.getHeader(SmppConstants.REGISTERED_DELIVERY, Byte.class));
        } else {
            submitMulti.setRegisteredDelivery(config.getRegisteredDelivery());
        }

        if (in.getHeaders().containsKey(SmppConstants.PROTOCOL_ID)) {
            submitMulti.setProtocolId(in.getHeader(SmppConstants.PROTOCOL_ID, Byte.class));
        } else {
            submitMulti.setProtocolId(config.getProtocolId());
        }

        if (in.getHeaders().containsKey(SmppConstants.PRIORITY_FLAG)) {
            submitMulti.setPriorityFlag(in.getHeader(SmppConstants.PRIORITY_FLAG, Byte.class));
        } else {
            submitMulti.setPriorityFlag(config.getPriorityFlag());
        }

        if (in.getHeaders().containsKey(SmppConstants.SCHEDULE_DELIVERY_TIME)) {
            submitMulti.setScheduleDeliveryTime(SmppUtils.formatTime(in.getHeader(SmppConstants.SCHEDULE_DELIVERY_TIME, Date.class)));
        }

        if (in.getHeaders().containsKey(SmppConstants.VALIDITY_PERIOD)) {
            submitMulti.setValidityPeriod(SmppUtils.formatTime(in.getHeader(SmppConstants.VALIDITY_PERIOD, Date.class)));
        }

        if (in.getHeaders().containsKey(SmppConstants.REPLACE_IF_PRESENT_FLAG)) {
            submitMulti.setReplaceIfPresentFlag(in.getHeader(SmppConstants.REPLACE_IF_PRESENT_FLAG, Byte.class));
        } else {
            submitMulti.setReplaceIfPresentFlag(config.getReplaceIfPresentFlag());
        }

        return submitMulti;
    }
View Full Code Here

            esmClass = new ESMClass(MessageMode.DEFAULT, MessageType.DEFAULT, GSMSpecificFeature.UDHI);
        } else {
            esmClass = new ESMClass();
        }

        SubmitMulti template = createSubmitMultiTemplate(exchange);
        SubmitMulti[] submitMulties = new SubmitMulti[segments.length];
       
        for (int i = 0; i < segments.length; i++) {
            SubmitMulti submitMulti = SmppUtils.copySubmitMulti(template);
            submitMulti.setEsmClass(esmClass.value());
            submitMulti.setDataCoding(template.getDataCoding());
            submitMulti.setShortMessage(segments[i]);
            submitMulties[i] = submitMulti;
        }

        return submitMulties;
    }
View Full Code Here

    }

    @SuppressWarnings({"unchecked"})
    protected SubmitMulti createSubmitMultiTemplate(Exchange exchange) {
        Message in = exchange.getIn();
        SubmitMulti submitMulti = new SubmitMulti();

        if (in.getHeaders().containsKey(SmppConstants.DATA_CODING)) {
            submitMulti.setDataCoding(in.getHeader(SmppConstants.DATA_CODING, Byte.class));
        } else {
            submitMulti.setDataCoding(config.getDataCoding());
        }

        byte destAddrTon;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_TON)) {
            destAddrTon = in.getHeader(SmppConstants.DEST_ADDR_TON, Byte.class);
        } else {
            destAddrTon = config.getDestAddrTon();
        }

        byte destAddrNpi;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_NPI)) {
            destAddrNpi = in.getHeader(SmppConstants.DEST_ADDR_NPI, Byte.class);
        } else {
            destAddrNpi = config.getDestAddrNpi();
        }

        List<String> destAddresses;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR)) {
            destAddresses = in.getHeader(SmppConstants.DEST_ADDR, List.class);
        } else {
            destAddresses = Arrays.asList(config.getDestAddr());
        }

        Address[] addresses = new Address[destAddresses.size()];
        int addrNum = 0;
        for (String destAddr : destAddresses) {
            Address addr = new Address(destAddrTon, destAddrNpi, destAddr);
            addresses[addrNum++] = addr;
        }
        submitMulti.setDestAddresses(addresses);

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR)) {
            submitMulti.setSourceAddr(in.getHeader(SmppConstants.SOURCE_ADDR, String.class));
        } else {
            submitMulti.setSourceAddr(config.getSourceAddr());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_TON)) {
            submitMulti.setSourceAddrTon(in.getHeader(SmppConstants.SOURCE_ADDR_TON, Byte.class));
        } else {
            submitMulti.setSourceAddrTon(config.getSourceAddrTon());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_NPI)) {
            submitMulti.setSourceAddrNpi(in.getHeader(SmppConstants.SOURCE_ADDR_NPI, Byte.class));
        } else {
            submitMulti.setSourceAddrNpi(config.getSourceAddrNpi());
        }

        if (in.getHeaders().containsKey(SmppConstants.SERVICE_TYPE)) {
            submitMulti.setServiceType(in.getHeader(SmppConstants.SERVICE_TYPE, String.class));
        } else {
            submitMulti.setServiceType(config.getServiceType());
        }

        if (in.getHeaders().containsKey(SmppConstants.REGISTERED_DELIVERY)) {
            submitMulti.setRegisteredDelivery(in.getHeader(SmppConstants.REGISTERED_DELIVERY, Byte.class));
        } else {
            submitMulti.setRegisteredDelivery(config.getRegisteredDelivery());
        }

        if (in.getHeaders().containsKey(SmppConstants.PROTOCOL_ID)) {
            submitMulti.setProtocolId(in.getHeader(SmppConstants.PROTOCOL_ID, Byte.class));
        } else {
            submitMulti.setProtocolId(config.getProtocolId());
        }

        if (in.getHeaders().containsKey(SmppConstants.PRIORITY_FLAG)) {
            submitMulti.setPriorityFlag(in.getHeader(SmppConstants.PRIORITY_FLAG, Byte.class));
        } else {
            submitMulti.setPriorityFlag(config.getPriorityFlag());
        }

        if (in.getHeaders().containsKey(SmppConstants.SCHEDULE_DELIVERY_TIME)) {
            submitMulti.setScheduleDeliveryTime(SmppUtils.formatTime(in.getHeader(SmppConstants.SCHEDULE_DELIVERY_TIME, Date.class)));
        }

        if (in.getHeaders().containsKey(SmppConstants.VALIDITY_PERIOD)) {
            Object validityPeriod = in.getHeader(SmppConstants.VALIDITY_PERIOD);
            if (validityPeriod instanceof String) {
                submitMulti.setValidityPeriod((String) validityPeriod);
            } else if (validityPeriod instanceof Date) {
                submitMulti.setValidityPeriod(SmppUtils.formatTime((Date) validityPeriod));
            }
        }

        if (in.getHeaders().containsKey(SmppConstants.REPLACE_IF_PRESENT_FLAG)) {
            submitMulti.setReplaceIfPresentFlag(in.getHeader(SmppConstants.REPLACE_IF_PRESENT_FLAG, Byte.class));
        } else {
            submitMulti.setReplaceIfPresentFlag(config.getReplaceIfPresentFlag());
        }

        Map<String, String> optinalParamaters = in.getHeader(SmppConstants.OPTIONAL_PARAMETERS, Map.class);
        if (optinalParamaters != null) {
            List<OptionalParameter> optParams = createOptionalParameters(optinalParamaters);
            submitMulti.setOptionalParameters(optParams.toArray(new OptionalParameter[optParams.size()]));
        } else {
            submitMulti.setOptionalParameters(new OptionalParameter[]{});
        }

        return submitMulti;
    }
View Full Code Here

            esmClass = new ESMClass(MessageMode.DEFAULT, MessageType.DEFAULT, GSMSpecificFeature.UDHI);
        } else {
            esmClass = new ESMClass();
        }

        SubmitMulti template = createSubmitMultiTemplate(exchange);
        SubmitMulti[] submitMulties = new SubmitMulti[segments.length];
       
        for (int i = 0; i < segments.length; i++) {
            SubmitMulti submitMulti = SmppUtils.copySubmitMulti(template);
            submitMulti.setEsmClass(esmClass.value());
            submitMulti.setDataCoding(template.getDataCoding());
            submitMulti.setShortMessage(segments[i]);
            submitMulties[i] = submitMulti;
        }

        return submitMulties;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    protected SubmitMulti createSubmitMultiTemplate(Exchange exchange) {
        Message in = exchange.getIn();
        SubmitMulti submitMulti = new SubmitMulti();

        if (in.getHeaders().containsKey(SmppConstants.DATA_CODING)) {
            submitMulti.setDataCoding(in.getHeader(SmppConstants.DATA_CODING, Byte.class));
        } else {
            submitMulti.setDataCoding(config.getDataCoding());
        }

        byte destAddrTon;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_TON)) {
            destAddrTon = in.getHeader(SmppConstants.DEST_ADDR_TON, Byte.class);
        } else {
            destAddrTon = config.getDestAddrTon();
        }

        byte destAddrNpi;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_NPI)) {
            destAddrNpi = in.getHeader(SmppConstants.DEST_ADDR_NPI, Byte.class);
        } else {
            destAddrNpi = config.getDestAddrNpi();
        }

        List<String> destAddresses;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR)) {
            destAddresses = in.getHeader(SmppConstants.DEST_ADDR, List.class);
        } else {
            destAddresses = Arrays.asList(config.getDestAddr());
        }

        Address[] addresses = new Address[destAddresses.size()];
        int addrNum = 0;
        for (String destAddr : destAddresses) {
            Address addr = new Address(destAddrTon, destAddrNpi, destAddr);
            addresses[addrNum++] = addr;
        }
        submitMulti.setDestAddresses(addresses);

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR)) {
            submitMulti.setSourceAddr(in.getHeader(SmppConstants.SOURCE_ADDR, String.class));
        } else {
            submitMulti.setSourceAddr(config.getSourceAddr());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_TON)) {
            submitMulti.setSourceAddrTon(in.getHeader(SmppConstants.SOURCE_ADDR_TON, Byte.class));
        } else {
            submitMulti.setSourceAddrTon(config.getSourceAddrTon());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_NPI)) {
            submitMulti.setSourceAddrNpi(in.getHeader(SmppConstants.SOURCE_ADDR_NPI, Byte.class));
        } else {
            submitMulti.setSourceAddrNpi(config.getSourceAddrNpi());
        }

        if (in.getHeaders().containsKey(SmppConstants.SERVICE_TYPE)) {
            submitMulti.setServiceType(in.getHeader(SmppConstants.SERVICE_TYPE, String.class));
        } else {
            submitMulti.setServiceType(config.getServiceType());
        }

        if (in.getHeaders().containsKey(SmppConstants.REGISTERED_DELIVERY)) {
            submitMulti.setRegisteredDelivery(in.getHeader(SmppConstants.REGISTERED_DELIVERY, Byte.class));
        } else {
            submitMulti.setRegisteredDelivery(config.getRegisteredDelivery());
        }

        if (in.getHeaders().containsKey(SmppConstants.PROTOCOL_ID)) {
            submitMulti.setProtocolId(in.getHeader(SmppConstants.PROTOCOL_ID, Byte.class));
        } else {
            submitMulti.setProtocolId(config.getProtocolId());
        }

        if (in.getHeaders().containsKey(SmppConstants.PRIORITY_FLAG)) {
            submitMulti.setPriorityFlag(in.getHeader(SmppConstants.PRIORITY_FLAG, Byte.class));
        } else {
            submitMulti.setPriorityFlag(config.getPriorityFlag());
        }

        if (in.getHeaders().containsKey(SmppConstants.SCHEDULE_DELIVERY_TIME)) {
            submitMulti.setScheduleDeliveryTime(SmppUtils.formatTime(in.getHeader(SmppConstants.SCHEDULE_DELIVERY_TIME, Date.class)));
        }

        if (in.getHeaders().containsKey(SmppConstants.VALIDITY_PERIOD)) {
            Object validityPeriod = in.getHeader(SmppConstants.VALIDITY_PERIOD);
            if (validityPeriod instanceof String) {
                submitMulti.setValidityPeriod((String) validityPeriod);
            } else if (validityPeriod instanceof Date) {
                submitMulti.setValidityPeriod(SmppUtils.formatTime((Date) validityPeriod));
            }
        }

        if (in.getHeaders().containsKey(SmppConstants.REPLACE_IF_PRESENT_FLAG)) {
            submitMulti.setReplaceIfPresentFlag(in.getHeader(SmppConstants.REPLACE_IF_PRESENT_FLAG, Byte.class));
        } else {
            submitMulti.setReplaceIfPresentFlag(config.getReplaceIfPresentFlag());
        }

        return submitMulti;
    }
View Full Code Here

        }
        return dest;
    }

    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;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    protected SubmitMulti createSubmitMultiTemplate(Exchange exchange) {
        Message in = exchange.getIn();
        SubmitMulti submitMulti = new SubmitMulti();

        if (in.getHeaders().containsKey(SmppConstants.DATA_CODING)) {
            submitMulti.setDataCoding(in.getHeader(SmppConstants.DATA_CODING, Byte.class));
        } else {
            submitMulti.setDataCoding(config.getDataCoding());
        }

        byte destAddrTon;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_TON)) {
            destAddrTon = in.getHeader(SmppConstants.DEST_ADDR_TON, Byte.class);
        } else {
            destAddrTon = config.getDestAddrTon();
        }

        byte destAddrNpi;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR_NPI)) {
            destAddrNpi = in.getHeader(SmppConstants.DEST_ADDR_NPI, Byte.class);
        } else {
            destAddrNpi = config.getDestAddrNpi();
        }

        List<String> destAddresses;
        if (in.getHeaders().containsKey(SmppConstants.DEST_ADDR)) {
            destAddresses = in.getHeader(SmppConstants.DEST_ADDR, List.class);
        } else {
            destAddresses = Arrays.asList(config.getDestAddr());
        }

        Address[] addresses = new Address[destAddresses.size()];
        int addrNum = 0;
        for (String destAddr : destAddresses) {
            Address addr = new Address(destAddrTon, destAddrNpi, destAddr);
            addresses[addrNum++] = addr;
        }
        submitMulti.setDestAddresses(addresses);

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR)) {
            submitMulti.setSourceAddr(in.getHeader(SmppConstants.SOURCE_ADDR, String.class));
        } else {
            submitMulti.setSourceAddr(config.getSourceAddr());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_TON)) {
            submitMulti.setSourceAddrTon(in.getHeader(SmppConstants.SOURCE_ADDR_TON, Byte.class));
        } else {
            submitMulti.setSourceAddrTon(config.getSourceAddrTon());
        }

        if (in.getHeaders().containsKey(SmppConstants.SOURCE_ADDR_NPI)) {
            submitMulti.setSourceAddrNpi(in.getHeader(SmppConstants.SOURCE_ADDR_NPI, Byte.class));
        } else {
            submitMulti.setSourceAddrNpi(config.getSourceAddrNpi());
        }

        if (in.getHeaders().containsKey(SmppConstants.SERVICE_TYPE)) {
            submitMulti.setServiceType(in.getHeader(SmppConstants.SERVICE_TYPE, String.class));
        } else {
            submitMulti.setServiceType(config.getServiceType());
        }

        if (in.getHeaders().containsKey(SmppConstants.REGISTERED_DELIVERY)) {
            submitMulti.setRegisteredDelivery(in.getHeader(SmppConstants.REGISTERED_DELIVERY, Byte.class));
        } else {
            submitMulti.setRegisteredDelivery(config.getRegisteredDelivery());
        }

        if (in.getHeaders().containsKey(SmppConstants.PROTOCOL_ID)) {
            submitMulti.setProtocolId(in.getHeader(SmppConstants.PROTOCOL_ID, Byte.class));
        } else {
            submitMulti.setProtocolId(config.getProtocolId());
        }

        if (in.getHeaders().containsKey(SmppConstants.PRIORITY_FLAG)) {
            submitMulti.setPriorityFlag(in.getHeader(SmppConstants.PRIORITY_FLAG, Byte.class));
        } else {
            submitMulti.setPriorityFlag(config.getPriorityFlag());
        }

        if (in.getHeaders().containsKey(SmppConstants.SCHEDULE_DELIVERY_TIME)) {
            submitMulti.setScheduleDeliveryTime(SmppUtils.formatTime(in.getHeader(SmppConstants.SCHEDULE_DELIVERY_TIME, Date.class)));
        }

        if (in.getHeaders().containsKey(SmppConstants.VALIDITY_PERIOD)) {
            Object validityPeriod = in.getHeader(SmppConstants.VALIDITY_PERIOD);
            if (validityPeriod instanceof String) {
                submitMulti.setValidityPeriod((String) validityPeriod);
            } else if (validityPeriod instanceof Date) {
                submitMulti.setValidityPeriod(SmppUtils.formatTime((Date) validityPeriod));
            }
        }

        if (in.getHeaders().containsKey(SmppConstants.REPLACE_IF_PRESENT_FLAG)) {
            submitMulti.setReplaceIfPresentFlag(in.getHeader(SmppConstants.REPLACE_IF_PRESENT_FLAG, Byte.class));
        } else {
            submitMulti.setReplaceIfPresentFlag(config.getReplaceIfPresentFlag());
        }

        return submitMulti;
    }
View Full Code Here

            esmClass = new ESMClass(MessageMode.DEFAULT, MessageType.DEFAULT, GSMSpecificFeature.UDHI);
        } else {
            esmClass = new ESMClass();
        }

        SubmitMulti template = createSubmitMultiTemplate(exchange);
        SubmitMulti[] submitMulties = new SubmitMulti[segments.length];
       
        for (int i = 0; i < segments.length; i++) {
            SubmitMulti submitMulti = SmppUtils.copySubmitMulti(template);
            submitMulti.setEsmClass(esmClass.value());
            submitMulti.setDataCoding(template.getDataCoding());
            submitMulti.setShortMessage(segments[i]);
            submitMulties[i] = submitMulti;
        }

        return submitMulties;
    }
View Full Code Here

TOP

Related Classes of org.jsmpp.bean.SubmitMulti

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.