src/main/java/com/github/mikesafonov/smpp/core/sender/MessageBuilder.java
@NotNull
    public SubmitSm createSubmitSm(@NotNull Message message,  boolean ucs2Only) {
        try {
            byte esmClass = getEsmClass(message.getMessageType());
            Address sourceAddress = addressBuilder.createSourceAddress(message.getSource());
            Address destAddress = addressBuilder.createDestinationAddress(message.getMsisdn());

            SubmitSm submitSm = createSubmitSm(message.getText(), esmClass, sourceAddress, destAddress, message.isSilent(), ucs2Only);

            if (message.getMessageType() == MessageType.SIMPLE) {
                registerDeliveryReport(submitSm);
            }

            return submitSm;
        } catch (SmppInvalidArgumentException e) {
            log.error(e.getMessage(), e);
            throw new SmppMessageBuildingException();
        }
    }
/**
     * Builds {@link SubmitSm} for sending via smpp.
     *
     * @param message  client message
     * @param ucs2Only use UCS2 encoding only or not
     * @return message {@link SubmitSm}.
     */
Builds  SubmitSm for sending via smpp.
@param message  client message
@param ucs2Only use UCS2 encoding only or not
@return message  SubmitSm.
Builds SubmitSm for sending via smpp . @param message client message @param ucs2Only use UCS2 encoding only or not @return message SubmitSm .
@NotNull
    public SubmitSm createSubmitSm(@NotNull Message message,  boolean ucs2Only) {
        try {
            byte esmClass = getEsmClass(message.getMessageType());
            Address sourceAddress = addressBuilder.createSourceAddress(message.getSource());
            Address destAddress = addressBuilder.createDestinationAddress(message.getMsisdn());
            SubmitSm submitSm = createSubmitSm(message.getText(), esmClass, sourceAddress, destAddress, message.isSilent(), ucs2Only);
            if (message.getMessageType() == MessageType.SIMPLE) {
                registerDeliveryReport(submitSm);
            }
            return submitSm;
        } catch (SmppInvalidArgumentException e) {
            log.error(e.getMessage(), e);
            throw new SmppMessageBuildingException();
        }
    }
@ NotNull public SubmitSm createSubmitSm ( @ NotNull Message message , boolean ucs2Only ) { try { byte esmClass = getEsmClass ( message . getMessageType ( ) ) ; Address sourceAddress = addressBuilder . createSourceAddress ( message . getSource ( ) ) ; Address destAddress = addressBuilder . createDestinationAddress ( message . getMsisdn ( ) ) ; SubmitSm submitSm = createSubmitSm ( message . getText ( ) , esmClass , sourceAddress , destAddress , message . isSilent ( ) , ucs2Only ) ; if ( message . getMessageType ( ) == MessageType . SIMPLE ) { registerDeliveryReport ( submitSm ) ; } return submitSm ; } catch ( SmppInvalidArgumentException e ) { log . error ( e . getMessage ( ) , e ) ; throw new SmppMessageBuildingException ( ) ; } }
Builds {@link SubmitSm} for sending via smpp.
Builds { @link SubmitSm } for sending via smpp .