| 1 | package fr.sii.ogham.sms.builder.cloudhopper; | |
| 2 | ||
| 3 | ||
| 4 | import static fr.sii.ogham.sms.CloudhopperConstants.DEFAULT_BIND_TYPE; | |
| 5 | import static fr.sii.ogham.sms.CloudhopperConstants.DEFAULT_CHARSET; | |
| 6 | import static fr.sii.ogham.sms.CloudhopperConstants.DEFAULT_INTERFACE_VERSION; | |
| 7 | import static fr.sii.ogham.sms.CloudhopperConstants.DEFAULT_RESPONSE_TIMEOUT; | |
| 8 | import static fr.sii.ogham.sms.CloudhopperConstants.DEFAULT_UNBIND_TIMEOUT; | |
| 9 | ||
| 10 | import java.util.function.Consumer; | |
| 11 | import java.util.function.Supplier; | |
| 12 | ||
| 13 | import org.slf4j.Logger; | |
| 14 | import org.slf4j.LoggerFactory; | |
| 15 | import org.slf4j.event.Level; | |
| 16 | ||
| 17 | import com.cloudhopper.commons.charset.Charset; | |
| 18 | import com.cloudhopper.smpp.SmppBindType; | |
| 19 | import com.cloudhopper.smpp.SmppClient; | |
| 20 | import com.cloudhopper.smpp.SmppConstants; | |
| 21 | import com.cloudhopper.smpp.SmppSessionConfiguration; | |
| 22 | import com.cloudhopper.smpp.SmppSessionHandler; | |
| 23 | import com.cloudhopper.smpp.impl.DefaultSmppClient; | |
| 24 | import com.cloudhopper.smpp.impl.DefaultSmppSessionHandler; | |
| 25 | import com.cloudhopper.smpp.pdu.Pdu; | |
| 26 | import com.cloudhopper.smpp.pdu.SubmitSm; | |
| 27 | import com.cloudhopper.smpp.ssl.SslConfiguration; | |
| 28 | import com.cloudhopper.smpp.type.Address; | |
| 29 | import com.cloudhopper.smpp.type.LoggingOptions; | |
| 30 | ||
| 31 | import fr.sii.ogham.core.async.ThreadSleepAwaiter; | |
| 32 | import fr.sii.ogham.core.builder.Builder; | |
| 33 | import fr.sii.ogham.core.builder.MessagingBuilder; | |
| 34 | import fr.sii.ogham.core.builder.configuration.ConfigurationValueBuilder; | |
| 35 | import fr.sii.ogham.core.builder.configuration.ConfigurationValueBuilderHelper; | |
| 36 | import fr.sii.ogham.core.builder.configurer.Configurer; | |
| 37 | import fr.sii.ogham.core.builder.context.BuildContext; | |
| 38 | import fr.sii.ogham.core.builder.context.DefaultBuildContext; | |
| 39 | import fr.sii.ogham.core.fluent.AbstractParent; | |
| 40 | import fr.sii.ogham.core.retry.RetryExecutor; | |
| 41 | import fr.sii.ogham.core.retry.SimpleRetryExecutor; | |
| 42 | import fr.sii.ogham.sms.builder.SmsBuilder; | |
| 43 | import fr.sii.ogham.sms.builder.cloudhopper.UserDataBuilder.UserDataPropValues; | |
| 44 | import fr.sii.ogham.sms.encoder.Encoder; | |
| 45 | import fr.sii.ogham.sms.message.Sms; | |
| 46 | import fr.sii.ogham.sms.message.addressing.translator.CompositePhoneNumberTranslator; | |
| 47 | import fr.sii.ogham.sms.message.addressing.translator.DefaultHandler; | |
| 48 | import fr.sii.ogham.sms.message.addressing.translator.PhoneNumberTranslator; | |
| 49 | import fr.sii.ogham.sms.sender.impl.CloudhopperSMPPSender; | |
| 50 | import fr.sii.ogham.sms.sender.impl.cloudhopper.ExtendedSmppSessionConfiguration; | |
| 51 | import fr.sii.ogham.sms.sender.impl.cloudhopper.KeepAliveOptions; | |
| 52 | import fr.sii.ogham.sms.sender.impl.cloudhopper.encoder.CloudhopperCharsetSupportingEncoder; | |
| 53 | import fr.sii.ogham.sms.sender.impl.cloudhopper.encoder.NamedCharset; | |
| 54 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.CharsetMapToCharacterEncodingGroupDataCodingProvider; | |
| 55 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.DataCodingProvider; | |
| 56 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.MessagePreparator; | |
| 57 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.ShortMessagePreparator; | |
| 58 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.TlvMessagePayloadMessagePreparator; | |
| 59 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.AlwaysNewSessionStrategy; | |
| 60 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.DefaultErrorAnalyzer; | |
| 61 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.ErrorAnalyzer; | |
| 62 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.ErrorHandler; | |
| 63 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.KeepSessionAliveStrategy; | |
| 64 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.LogErrorHandler; | |
| 65 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.MayReuseSessionStrategy; | |
| 66 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.RespondToDeliveryReceiptHandler; | |
| 67 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.RespondToEnquireLinkRequestHandler; | |
| 68 | import fr.sii.ogham.sms.sender.impl.cloudhopper.session.SessionHandlingStrategy; | |
| 69 | import fr.sii.ogham.sms.splitter.GsmMessageSplitter; | |
| 70 | import fr.sii.ogham.sms.splitter.MessageSplitter; | |
| 71 | import fr.sii.ogham.sms.splitter.NoSplitMessageSplitter; | |
| 72 | import fr.sii.ogham.sms.splitter.ReferenceNumberGenerator; | |
| 73 | ||
| 74 | /** | |
| 75 | * Configures Cloudhopper: | |
| 76 | * | |
| 77 | * <ul> | |
| 78 | * <li>SMPP protocol parameters (host, port, systemId, password, | |
| 79 | * version...)</li> | |
| 80 | * <li>Session management (name, bind, timeouts, retry...)</li> | |
| 81 | * <li>SSL configuration</li> | |
| 82 | * <li>Logging options</li> | |
| 83 | * </ul> | |
| 84 | * | |
| 85 | * <p> | |
| 86 | * To send {@link Sms} using Cloudhopper, you need to register this builder into | |
| 87 | * a {@link MessagingBuilder} like this: | |
| 88 | * | |
| 89 | * <pre> | |
| 90 | * <code> | |
| 91 | * MessagingBuilder msgBuilder = ... | |
| 92 | * msgBuilder.sms() | |
| 93 | * .sender(CloudhopperBuilder.class) // registers the builder and accesses to that builder for configuring it | |
| 94 | * </code> | |
| 95 | * </pre> | |
| 96 | * | |
| 97 | * Once the builder is registered, sending sms through Cloudhopper requires at | |
| 98 | * least host of the SMPP server. You can define it using: | |
| 99 | * | |
| 100 | * <pre> | |
| 101 | * <code> | |
| 102 | * msgBuilder.sms() | |
| 103 | * .sender(CloudhopperBuilder.class) // registers the builder and accesses to that builder for configuring it | |
| 104 | * .host("localhost") | |
| 105 | * </code> | |
| 106 | * </pre> | |
| 107 | * | |
| 108 | * Or you can also use property keys (using interpolation): | |
| 109 | * | |
| 110 | * <pre> | |
| 111 | * <code> | |
| 112 | * msgBuilder | |
| 113 | * .environment() | |
| 114 | * .properties() | |
| 115 | * .set("custom.property.for.host", "localhost") | |
| 116 | * .and() | |
| 117 | * .and() | |
| 118 | * .sms() | |
| 119 | * .sender(CloudhopperBuilder.class) // registers the builder and accesses to that builder for configuring it | |
| 120 | * .host() | |
| 121 | * .properties("${custom.property.for.host}") | |
| 122 | * </code> | |
| 123 | * </pre> | |
| 124 | * | |
| 125 | * You can do the same with port of the SMPP server. | |
| 126 | * | |
| 127 | * | |
| 128 | * <p> | |
| 129 | * SMPP server may require authentication. In most cases, authentication is done | |
| 130 | * using system_id/password. You can use this builder to quickly provide your | |
| 131 | * system_id and password: | |
| 132 | * | |
| 133 | * <pre> | |
| 134 | * <code> | |
| 135 | * .sender(CloudhopperBuilder.class) | |
| 136 | * .systemId("foo") | |
| 137 | * .password("bar") | |
| 138 | * </code> | |
| 139 | * </pre> | |
| 140 | * | |
| 141 | * | |
| 142 | * @author Aurélien Baudet | |
| 143 | */ | |
| 144 | public class CloudhopperBuilder extends AbstractParent<SmsBuilder> implements Builder<CloudhopperSMPPSender> { | |
| 145 | private static final Logger LOG = LoggerFactory.getLogger(CloudhopperBuilder.class); | |
| 146 | ||
| 147 | private final ReadableEncoderBuilder sharedEncoderBuilder; | |
| 148 | private BuildContext buildContext; | |
| 149 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, String> systemIdValueBuilder; | |
| 150 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, String> passwordValueBuilder; | |
| 151 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, String> hostValueBuilder; | |
| 152 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, Integer> portValueBuilder; | |
| 153 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, String> systemTypeValueBuilder; | |
| 154 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, InterfaceVersion> interfaceVersionValueBuilder; | |
| 155 | private final ConfigurationValueBuilderHelper<CloudhopperBuilder, SmppBindType> bindTypeValueBuilder; | |
| 156 | private SessionBuilder sessionBuilder; | |
| 157 | private ExtendedSmppSessionConfiguration sessionConfiguration; | |
| 158 | private Address addressRange; | |
| 159 | private SslBuilder sslBuilder; | |
| 160 | private LoggingBuilder loggingBuilder; | |
| 161 | private SmppClientSupplier clientSupplier; | |
| 162 | private SmppSessionHandlerSupplier smppSessionHandler; | |
| 163 | private MessageSplitterBuilder messageSplitterBuilder; | |
| 164 | private EncoderBuilder encoderBuilder; | |
| 165 | private UserDataBuilder userDataBuilder; | |
| 166 | private DataCodingSchemeBuilder dataCodingBuilder; | |
| 167 | private MessagePreparator preparator; | |
| 168 | ||
| 169 | /** | |
| 170 | * Default constructor when using without all Ogham work. | |
| 171 | * | |
| 172 | * <strong>WARNING: use is only if you know what you are doing !</strong> | |
| 173 | */ | |
| 174 | public CloudhopperBuilder() { | |
| 175 | this(null, new DefaultBuildContext()); | |
| 176 | } | |
| 177 | ||
| 178 | /** | |
| 179 | * Constructor that is called when using Ogham builder: | |
| 180 | * | |
| 181 | * <pre> | |
| 182 | * MessagingBuilder msgBuilder = ... | |
| 183 | * msgBuilder | |
| 184 | * .sms() | |
| 185 | * .sender(CloudhopperBuilder.class) | |
| 186 | * </pre> | |
| 187 | * | |
| 188 | * @param parent | |
| 189 | * the parent builder instance for fluent chaining | |
| 190 | * @param buildContext | |
| 191 | * for registering instances and property evaluation | |
| 192 | */ | |
| 193 | public CloudhopperBuilder(SmsBuilder parent, BuildContext buildContext) { | |
| 194 | super(parent); | |
| 195 | this.buildContext = buildContext; | |
| 196 | sharedEncoderBuilder = new ReadableEncoderBuilder(buildContext); | |
| 197 | systemIdValueBuilder = buildContext.newConfigurationValueBuilder(this, String.class); | |
| 198 | passwordValueBuilder = buildContext.newConfigurationValueBuilder(this, String.class); | |
| 199 | hostValueBuilder = buildContext.newConfigurationValueBuilder(this, String.class); | |
| 200 | portValueBuilder = buildContext.newConfigurationValueBuilder(this, Integer.class); | |
| 201 | interfaceVersionValueBuilder = buildContext.newConfigurationValueBuilder(this, InterfaceVersion.class); | |
| 202 | systemTypeValueBuilder = buildContext.newConfigurationValueBuilder(this, String.class); | |
| 203 | bindTypeValueBuilder = buildContext.newConfigurationValueBuilder(this, SmppBindType.class); | |
| 204 | } | |
| 205 | ||
| 206 | /** | |
| 207 | * The system_id parameter is used to identify an ESME ( External Short | |
| 208 | * Message Entity) or an SMSC (Short Message Service Centre) at bind time. | |
| 209 | * An ESME system_id identifies the ESME or ESME agent to the SMSC. The SMSC | |
| 210 | * system_id provides an identification of the SMSC to the ESME. | |
| 211 | * | |
| 212 | * <p> | |
| 213 | * The value set using this method takes precedence over any property and | |
| 214 | * default value configured using {@link #systemId()}. | |
| 215 | * | |
| 216 | * <pre> | |
| 217 | * .systemId("my-system-id") | |
| 218 | * .systemId() | |
| 219 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 220 | * .defaultValue("default-system-id") | |
| 221 | * </pre> | |
| 222 | * | |
| 223 | * <pre> | |
| 224 | * .systemId("my-system-id") | |
| 225 | * .systemId() | |
| 226 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 227 | * .defaultValue("default-system-id") | |
| 228 | * </pre> | |
| 229 | * | |
| 230 | * In both cases, {@code systemId("my-system-id")} is used. | |
| 231 | * | |
| 232 | * <p> | |
| 233 | * If this method is called several times, only the last value is used. | |
| 234 | * | |
| 235 | * <p> | |
| 236 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 237 | * property/default value configuration is applied. | |
| 238 | * | |
| 239 | * @param systemId | |
| 240 | * the system_id value | |
| 241 | * @return this instance for fluent chaining | |
| 242 | */ | |
| 243 | public CloudhopperBuilder systemId(String systemId) { | |
| 244 |
1
1. systemId : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
systemIdValueBuilder.setValue(systemId); |
| 245 |
1
1. systemId : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemId → NO_COVERAGE |
return this; |
| 246 | } | |
| 247 | ||
| 248 | /** | |
| 249 | * The system_id parameter is used to identify an ESME ( External Short | |
| 250 | * Message Entity) or an SMSC (Short Message Service Centre) at bind time. | |
| 251 | * An ESME system_id identifies the ESME or ESME agent to the SMSC. The SMSC | |
| 252 | * system_id provides an identification of the SMSC to the ESME. | |
| 253 | * | |
| 254 | * <p> | |
| 255 | * This method is mainly used by {@link Configurer}s to register some | |
| 256 | * property keys and/or a default value. The aim is to let developer be able | |
| 257 | * to externalize its configuration (using system properties, configuration | |
| 258 | * file or anything else). If the developer doesn't configure any value for | |
| 259 | * the registered properties, the default value is used (if set). | |
| 260 | * | |
| 261 | * <pre> | |
| 262 | * .systemId() | |
| 263 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 264 | * .defaultValue("default-system-id") | |
| 265 | * </pre> | |
| 266 | * | |
| 267 | * <p> | |
| 268 | * Non-null value set using {@link #systemId(String)} takes precedence over | |
| 269 | * property values and default value. | |
| 270 | * | |
| 271 | * <pre> | |
| 272 | * .systemId("my-system-id") | |
| 273 | * .systemId() | |
| 274 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 275 | * .defaultValue("default-system-id") | |
| 276 | * </pre> | |
| 277 | * | |
| 278 | * The value {@code "my-system-id"} is used regardless of the value of the | |
| 279 | * properties and default value. | |
| 280 | * | |
| 281 | * <p> | |
| 282 | * See {@link ConfigurationValueBuilder} for more information. | |
| 283 | * | |
| 284 | * | |
| 285 | * @return the builder to configure property keys/default value | |
| 286 | */ | |
| 287 | public ConfigurationValueBuilder<CloudhopperBuilder, String> systemId() { | |
| 288 |
5
1. systemId : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemId → KILLED 2. systemId : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemId → KILLED 3. systemId : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemId → KILLED 4. systemId : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemId → KILLED 5. systemId : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemId → KILLED |
return systemIdValueBuilder; |
| 289 | } | |
| 290 | ||
| 291 | /** | |
| 292 | * The system_type parameter is used to categorize the type of ESME that is | |
| 293 | * binding to the SMSC. Examples include “VMS” (voice mail system) and “OTA” | |
| 294 | * (over-the-air activation system). Specification of the system_type is | |
| 295 | * optional - some SMSC’s may not require ESME’s to provide this detail. In | |
| 296 | * this case, the ESME can set the system_type to NULL. The system_type | |
| 297 | * (optional) may be used to categorize the system, e.g., “EMAIL”, “WWW”, | |
| 298 | * etc. | |
| 299 | * | |
| 300 | * <p> | |
| 301 | * The value set using this method takes precedence over any property and | |
| 302 | * default value configured using {@link #systemType()}. | |
| 303 | * | |
| 304 | * <pre> | |
| 305 | * .systemType("my-system-type") | |
| 306 | * .systemType() | |
| 307 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 308 | * .defaultValue("default-system-type") | |
| 309 | * </pre> | |
| 310 | * | |
| 311 | * <pre> | |
| 312 | * .systemType("my-system-type") | |
| 313 | * .systemType() | |
| 314 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 315 | * .defaultValue("default-system-type") | |
| 316 | * </pre> | |
| 317 | * | |
| 318 | * In both cases, {@code systemType("my-system-type")} is used. | |
| 319 | * | |
| 320 | * <p> | |
| 321 | * If this method is called several times, only the last value is used. | |
| 322 | * | |
| 323 | * <p> | |
| 324 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 325 | * property/default value configuration is applied. | |
| 326 | * | |
| 327 | * @param systemType | |
| 328 | * the system type value | |
| 329 | * @return this instance for fluent chaining | |
| 330 | */ | |
| 331 | public CloudhopperBuilder systemType(String systemType) { | |
| 332 |
1
1. systemType : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
systemTypeValueBuilder.setValue(systemType); |
| 333 |
1
1. systemType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemType → NO_COVERAGE |
return this; |
| 334 | } | |
| 335 | ||
| 336 | /** | |
| 337 | * The system_type parameter is used to categorize the type of ESME that is | |
| 338 | * binding to the SMSC. Examples include “VMS” (voice mail system) and “OTA” | |
| 339 | * (over-the-air activation system). Specification of the system_type is | |
| 340 | * optional - some SMSC’s may not require ESME’s to provide this detail. In | |
| 341 | * this case, the ESME can set the system_type to NULL. The system_type | |
| 342 | * (optional) may be used to categorize the system, e.g., “EMAIL”, “WWW”, | |
| 343 | * etc. | |
| 344 | * | |
| 345 | * <p> | |
| 346 | * This method is mainly used by {@link Configurer}s to register some | |
| 347 | * property keys and/or a default value. The aim is to let developer be able | |
| 348 | * to externalize its configuration (using system properties, configuration | |
| 349 | * file or anything else). If the developer doesn't configure any value for | |
| 350 | * the registered properties, the default value is used (if set). | |
| 351 | * | |
| 352 | * <pre> | |
| 353 | * .systemType() | |
| 354 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 355 | * .defaultValue("defaut-system-type") | |
| 356 | * </pre> | |
| 357 | * | |
| 358 | * <p> | |
| 359 | * Non-null value set using {@link #systemType(String)} takes precedence | |
| 360 | * over property values and default value. | |
| 361 | * | |
| 362 | * <pre> | |
| 363 | * .systemType("my-system-type") | |
| 364 | * .systemType() | |
| 365 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 366 | * .defaultValue("defaut-system-type") | |
| 367 | * </pre> | |
| 368 | * | |
| 369 | * The value {@code "my-system-type"} is used regardless of the value of the | |
| 370 | * properties and default value. | |
| 371 | * | |
| 372 | * <p> | |
| 373 | * See {@link ConfigurationValueBuilder} for more information. | |
| 374 | * | |
| 375 | * | |
| 376 | * @return the builder to configure property keys/default value | |
| 377 | */ | |
| 378 | public ConfigurationValueBuilder<CloudhopperBuilder, String> systemType() { | |
| 379 |
5
1. systemType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemType → KILLED 2. systemType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemType → KILLED 3. systemType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemType → KILLED 4. systemType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemType → KILLED 5. systemType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::systemType → KILLED |
return systemTypeValueBuilder; |
| 380 | } | |
| 381 | ||
| 382 | /** | |
| 383 | * The password parameter is used by the SMSC to authenticate the identity | |
| 384 | * of the binding ESME. The Service Provider may require ESME’s to provide a | |
| 385 | * password when binding to the SMSC. This password is normally issued by | |
| 386 | * the SMSC system administrator. The password parameter may also be used by | |
| 387 | * the ESME to authenticate the identity of the binding SMSC (e.g. in the | |
| 388 | * case of the outbind operation). | |
| 389 | * | |
| 390 | * <p> | |
| 391 | * The value set using this method takes precedence over any property and | |
| 392 | * default value configured using {@link #password()}. | |
| 393 | * | |
| 394 | * <pre> | |
| 395 | * .password("my-password") | |
| 396 | * .password() | |
| 397 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 398 | * .defaultValue("default-password") | |
| 399 | * </pre> | |
| 400 | * | |
| 401 | * <pre> | |
| 402 | * .password("my-password") | |
| 403 | * .password() | |
| 404 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 405 | * .defaultValue("default-password") | |
| 406 | * </pre> | |
| 407 | * | |
| 408 | * In both cases, {@code password("my-password")} is used. | |
| 409 | * | |
| 410 | * <p> | |
| 411 | * If this method is called several times, only the last value is used. | |
| 412 | * | |
| 413 | * <p> | |
| 414 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 415 | * property/default value configuration is applied. | |
| 416 | * | |
| 417 | * @param password | |
| 418 | * the password used to authenticate | |
| 419 | * @return this instance for fluent chaining | |
| 420 | */ | |
| 421 | public CloudhopperBuilder password(String password) { | |
| 422 |
1
1. password : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
passwordValueBuilder.setValue(password); |
| 423 |
1
1. password : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::password → NO_COVERAGE |
return this; |
| 424 | } | |
| 425 | ||
| 426 | /** | |
| 427 | * The password parameter is used by the SMSC to authenticate the identity | |
| 428 | * of the binding ESME. The Service Provider may require ESME’s to provide a | |
| 429 | * password when binding to the SMSC. This password is normally issued by | |
| 430 | * the SMSC system administrator. The password parameter may also be used by | |
| 431 | * the ESME to authenticate the identity of the binding SMSC (e.g. in the | |
| 432 | * case of the outbind operation). | |
| 433 | * | |
| 434 | * <p> | |
| 435 | * This method is mainly used by {@link Configurer}s to register some | |
| 436 | * property keys and/or a default value. The aim is to let developer be able | |
| 437 | * to externalize its configuration (using system properties, configuration | |
| 438 | * file or anything else). If the developer doesn't configure any value for | |
| 439 | * the registered properties, the default value is used (if set). | |
| 440 | * | |
| 441 | * <pre> | |
| 442 | * .password() | |
| 443 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 444 | * .defaultValue("default-password") | |
| 445 | * </pre> | |
| 446 | * | |
| 447 | * <p> | |
| 448 | * Non-null value set using {@link #password(String)} takes precedence over | |
| 449 | * property values and default value. | |
| 450 | * | |
| 451 | * <pre> | |
| 452 | * .password("my-password") | |
| 453 | * .password() | |
| 454 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 455 | * .defaultValue("default-password") | |
| 456 | * </pre> | |
| 457 | * | |
| 458 | * The value {@code "my-password"} is used regardless of the value of the | |
| 459 | * properties and default value. | |
| 460 | * | |
| 461 | * <p> | |
| 462 | * See {@link ConfigurationValueBuilder} for more information. | |
| 463 | * | |
| 464 | * | |
| 465 | * @return the builder to configure property keys/default value | |
| 466 | */ | |
| 467 | public ConfigurationValueBuilder<CloudhopperBuilder, String> password() { | |
| 468 |
5
1. password : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::password → KILLED 2. password : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::password → KILLED 3. password : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::password → KILLED 4. password : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::password → KILLED 5. password : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::password → KILLED |
return passwordValueBuilder; |
| 469 | } | |
| 470 | ||
| 471 | /** | |
| 472 | * The SMPP server host (IP or address). | |
| 473 | * | |
| 474 | * <p> | |
| 475 | * The value set using this method takes precedence over any property and | |
| 476 | * default value configured using {@link #host()}. | |
| 477 | * | |
| 478 | * <pre> | |
| 479 | * .host("localhost") | |
| 480 | * .host() | |
| 481 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 482 | * .defaultValue("default-host") | |
| 483 | * </pre> | |
| 484 | * | |
| 485 | * <pre> | |
| 486 | * .host("localhost") | |
| 487 | * .host() | |
| 488 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 489 | * .defaultValue("default-host") | |
| 490 | * </pre> | |
| 491 | * | |
| 492 | * In both cases, {@code host("localhost")} is used. | |
| 493 | * | |
| 494 | * <p> | |
| 495 | * If this method is called several times, only the last value is used. | |
| 496 | * | |
| 497 | * <p> | |
| 498 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 499 | * property/default value configuration is applied. | |
| 500 | * | |
| 501 | * @param host | |
| 502 | * the host address | |
| 503 | * @return this instance for fluent chaining | |
| 504 | */ | |
| 505 | public CloudhopperBuilder host(String host) { | |
| 506 |
3
1. host : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE 2. host : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → KILLED 3. host : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → KILLED |
hostValueBuilder.setValue(host); |
| 507 |
3
1. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → SURVIVED 2. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → NO_COVERAGE 3. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → KILLED |
return this; |
| 508 | } | |
| 509 | ||
| 510 | /** | |
| 511 | * The SMPP server host (IP or address). | |
| 512 | * | |
| 513 | * <p> | |
| 514 | * This method is mainly used by {@link Configurer}s to register some | |
| 515 | * property keys and/or a default value. The aim is to let developer be able | |
| 516 | * to externalize its configuration (using system properties, configuration | |
| 517 | * file or anything else). If the developer doesn't configure any value for | |
| 518 | * the registered properties, the default value is used (if set). | |
| 519 | * | |
| 520 | * <pre> | |
| 521 | * .host() | |
| 522 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 523 | * .defaultValue("default-host") | |
| 524 | * </pre> | |
| 525 | * | |
| 526 | * <p> | |
| 527 | * Non-null value set using {@link #host(String)} takes precedence over | |
| 528 | * property values and default value. | |
| 529 | * | |
| 530 | * <pre> | |
| 531 | * .host("localhost") | |
| 532 | * .host() | |
| 533 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 534 | * .defaultValue("default-host") | |
| 535 | * </pre> | |
| 536 | * | |
| 537 | * The value {@code "localhost"} is used regardless of the value of the | |
| 538 | * properties and default value. | |
| 539 | * | |
| 540 | * <p> | |
| 541 | * See {@link ConfigurationValueBuilder} for more information. | |
| 542 | * | |
| 543 | * | |
| 544 | * @return the builder to configure property keys/default value | |
| 545 | */ | |
| 546 | public ConfigurationValueBuilder<CloudhopperBuilder, String> host() { | |
| 547 |
5
1. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → KILLED 2. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → KILLED 3. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → KILLED 4. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → KILLED 5. host : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::host → KILLED |
return hostValueBuilder; |
| 548 | } | |
| 549 | ||
| 550 | /** | |
| 551 | * Set the SMPP server port. | |
| 552 | * | |
| 553 | * <p> | |
| 554 | * The value set using this method takes precedence over any property and | |
| 555 | * default value configured using {@link #port()}. | |
| 556 | * | |
| 557 | * <pre> | |
| 558 | * .port(2775) | |
| 559 | * .port() | |
| 560 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 561 | * .defaultValue(1775) | |
| 562 | * </pre> | |
| 563 | * | |
| 564 | * <pre> | |
| 565 | * .port(2775) | |
| 566 | * .port() | |
| 567 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 568 | * .defaultValue(1775) | |
| 569 | * </pre> | |
| 570 | * | |
| 571 | * In both cases, {@code port(2775)} is used. | |
| 572 | * | |
| 573 | * <p> | |
| 574 | * If this method is called several times, only the last value is used. | |
| 575 | * | |
| 576 | * <p> | |
| 577 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 578 | * property/default value configuration is applied. | |
| 579 | * | |
| 580 | * @param port | |
| 581 | * the SMPP server port | |
| 582 | * @return this instance for fluent chaining | |
| 583 | */ | |
| 584 | public CloudhopperBuilder port(Integer port) { | |
| 585 |
3
1. port : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE 2. port : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → KILLED 3. port : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → KILLED |
portValueBuilder.setValue(port); |
| 586 |
3
1. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → NO_COVERAGE 2. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED 3. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED |
return this; |
| 587 | } | |
| 588 | ||
| 589 | /** | |
| 590 | * Set the SMPP server port. | |
| 591 | * | |
| 592 | * <p> | |
| 593 | * This method is mainly used by {@link Configurer}s to register some | |
| 594 | * property keys and/or a default value. The aim is to let developer be able | |
| 595 | * to externalize its configuration (using system properties, configuration | |
| 596 | * file or anything else). If the developer doesn't configure any value for | |
| 597 | * the registered properties, the default value is used (if set). | |
| 598 | * | |
| 599 | * <pre> | |
| 600 | * .port() | |
| 601 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 602 | * .defaultValue(1775) | |
| 603 | * </pre> | |
| 604 | * | |
| 605 | * <p> | |
| 606 | * Non-null value set using {@link #port(Integer)} takes precedence over | |
| 607 | * property values and default value. | |
| 608 | * | |
| 609 | * <pre> | |
| 610 | * .port(2775) | |
| 611 | * .port() | |
| 612 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 613 | * .defaultValue(1775) | |
| 614 | * </pre> | |
| 615 | * | |
| 616 | * The value {@code 2775} is used regardless of the value of the properties | |
| 617 | * and default value. | |
| 618 | * | |
| 619 | * <p> | |
| 620 | * See {@link ConfigurationValueBuilder} for more information. | |
| 621 | * | |
| 622 | * | |
| 623 | * @return the builder to configure property keys/default value | |
| 624 | */ | |
| 625 | public ConfigurationValueBuilder<CloudhopperBuilder, Integer> port() { | |
| 626 |
5
1. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED 2. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED 3. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED 4. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED 5. port : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::port → KILLED |
return portValueBuilder; |
| 627 | } | |
| 628 | ||
| 629 | /** | |
| 630 | * The SMPP protocol version (one of {@link InterfaceVersion#VERSION_3_3}, | |
| 631 | * {@link InterfaceVersion#VERSION_3_4}, | |
| 632 | * {@link InterfaceVersion#VERSION_5_0}). | |
| 633 | * | |
| 634 | * <p> | |
| 635 | * The value set using this method takes precedence over any property and | |
| 636 | * default value configured using {@link #interfaceVersion()}. | |
| 637 | * | |
| 638 | * <pre> | |
| 639 | * .interfaceVersion(InterfaceVersion.VERSION_5_0) | |
| 640 | * .interfaceVersion() | |
| 641 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 642 | * .defaultValue(InterfaceVersion.VERSION_3_4) | |
| 643 | * </pre> | |
| 644 | * | |
| 645 | * <pre> | |
| 646 | * .interfaceVersion(InterfaceVersion.VERSION_5_0) | |
| 647 | * .interfaceVersion() | |
| 648 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 649 | * .defaultValue(InterfaceVersion.VERSION_3_4) | |
| 650 | * </pre> | |
| 651 | * | |
| 652 | * In both cases, {@code interfaceVersion(InterfaceVersion.VERSION_5_0)} is | |
| 653 | * used. | |
| 654 | * | |
| 655 | * <p> | |
| 656 | * If this method is called several times, only the last value is used. | |
| 657 | * | |
| 658 | * <p> | |
| 659 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 660 | * property/default value configuration is applied. | |
| 661 | * | |
| 662 | * @param version | |
| 663 | * the version of the SMPP protocol | |
| 664 | * @return this instance for fluent chaining | |
| 665 | */ | |
| 666 | public CloudhopperBuilder interfaceVersion(InterfaceVersion version) { | |
| 667 |
1
1. interfaceVersion : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
interfaceVersionValueBuilder.setValue(version); |
| 668 |
1
1. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → NO_COVERAGE |
return this; |
| 669 | } | |
| 670 | ||
| 671 | /** | |
| 672 | * The SMPP protocol version (one of {@link SmppConstants#VERSION_3_3}, | |
| 673 | * {@link SmppConstants#VERSION_3_4}, {@link SmppConstants#VERSION_5_0}). | |
| 674 | * | |
| 675 | * <p> | |
| 676 | * The value set using this method takes precedence over any property and | |
| 677 | * default value configured using {@link #interfaceVersion()}. | |
| 678 | * | |
| 679 | * <pre> | |
| 680 | * .interfaceVersion(SmppConstants.VERSION_5_0) | |
| 681 | * .interfaceVersion() | |
| 682 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 683 | * .defaultValue(SmppConstants.VERSION_3_4) | |
| 684 | * </pre> | |
| 685 | * | |
| 686 | * <pre> | |
| 687 | * .interfaceVersion(SmppConstants.VERSION_5_0) | |
| 688 | * .interfaceVersion() | |
| 689 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 690 | * .defaultValue(SmppConstants.VERSION_3_4) | |
| 691 | * </pre> | |
| 692 | * | |
| 693 | * In both cases, {@code interfaceVersion(SmppConstants.VERSION_5_0)} is | |
| 694 | * used. | |
| 695 | * | |
| 696 | * <p> | |
| 697 | * If this method is called several times, only the last value is used. | |
| 698 | * | |
| 699 | * <p> | |
| 700 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 701 | * property/default value configuration is applied. | |
| 702 | * | |
| 703 | * @param version | |
| 704 | * the version of the SMPP protocol | |
| 705 | * @return this instance for fluent chaining | |
| 706 | */ | |
| 707 | public CloudhopperBuilder interfaceVersion(Byte version) { | |
| 708 |
1
1. interfaceVersion : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
interfaceVersionValueBuilder.setValue(InterfaceVersion.fromValue(version)); |
| 709 |
1
1. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → NO_COVERAGE |
return this; |
| 710 | } | |
| 711 | ||
| 712 | /** | |
| 713 | * The SMPP protocol version (one of {@link InterfaceVersion#VERSION_3_3}, | |
| 714 | * {@link InterfaceVersion#VERSION_3_4}, | |
| 715 | * {@link InterfaceVersion#VERSION_5_0}). | |
| 716 | * | |
| 717 | * | |
| 718 | * <p> | |
| 719 | * This method is mainly used by {@link Configurer}s to register some | |
| 720 | * property keys and/or a default value. The aim is to let developer be able | |
| 721 | * to externalize its configuration (using system properties, configuration | |
| 722 | * file or anything else). If the developer doesn't configure any value for | |
| 723 | * the registered properties, the default value is used (if set). | |
| 724 | * | |
| 725 | * <pre> | |
| 726 | * .interfaceVersion() | |
| 727 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 728 | * .defaultValue(InterfaceVersion.VERSION_3_4) | |
| 729 | * </pre> | |
| 730 | * | |
| 731 | * <p> | |
| 732 | * Non-null value set using {@link #interfaceVersion(InterfaceVersion)} | |
| 733 | * takes precedence over property values and default value. | |
| 734 | * | |
| 735 | * <pre> | |
| 736 | * .interfaceVersion(InterfaceVersion.VERSION_5_0) | |
| 737 | * .interfaceVersion() | |
| 738 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 739 | * .defaultValue(InterfaceVersion.VERSION_3_4) | |
| 740 | * </pre> | |
| 741 | * | |
| 742 | * The value {@code InterfaceVersion.VERSION_5_0} is used regardless of the | |
| 743 | * value of the properties and default value. | |
| 744 | * | |
| 745 | * <p> | |
| 746 | * See {@link ConfigurationValueBuilder} for more information. | |
| 747 | * | |
| 748 | * | |
| 749 | * @return the builder to configure property keys/default value | |
| 750 | */ | |
| 751 | public ConfigurationValueBuilder<CloudhopperBuilder, InterfaceVersion> interfaceVersion() { | |
| 752 |
5
1. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → KILLED 2. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → KILLED 3. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → KILLED 4. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → KILLED 5. interfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::interfaceVersion → KILLED |
return interfaceVersionValueBuilder; |
| 753 | } | |
| 754 | ||
| 755 | /** | |
| 756 | * The bind command type (see {@link SmppBindType}). | |
| 757 | * | |
| 758 | * <p> | |
| 759 | * The value set using this method takes precedence over any property and | |
| 760 | * default value configured using {@link #bindType()}. | |
| 761 | * | |
| 762 | * <pre> | |
| 763 | * .bindType(SmppBindType.TRANSCEIVER) | |
| 764 | * .bindType() | |
| 765 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 766 | * .defaultValue(SmppBindType.RECEIVER) | |
| 767 | * </pre> | |
| 768 | * | |
| 769 | * <pre> | |
| 770 | * .bindType(SmppBindType.TRANSCEIVER) | |
| 771 | * .bindType() | |
| 772 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 773 | * .defaultValue(SmppBindType.RECEIVER) | |
| 774 | * </pre> | |
| 775 | * | |
| 776 | * In both cases, {@code bindType(SmppBindType.TRANSCEIVER)} is used. | |
| 777 | * | |
| 778 | * <p> | |
| 779 | * If this method is called several times, only the last value is used. | |
| 780 | * | |
| 781 | * <p> | |
| 782 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 783 | * property/default value configuration is applied. | |
| 784 | * | |
| 785 | * @param bindType | |
| 786 | * the bind type | |
| 787 | * @return this instance for fluent chaining | |
| 788 | */ | |
| 789 | public CloudhopperBuilder bindType(SmppBindType bindType) { | |
| 790 |
1
1. bindType : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
bindTypeValueBuilder.setValue(bindType); |
| 791 |
1
1. bindType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::bindType → NO_COVERAGE |
return this; |
| 792 | } | |
| 793 | ||
| 794 | /** | |
| 795 | * The bind command type (see {@link SmppBindType}). | |
| 796 | * | |
| 797 | * <p> | |
| 798 | * This method is mainly used by {@link Configurer}s to register some | |
| 799 | * property keys and/or a default value. The aim is to let developer be able | |
| 800 | * to externalize its configuration (using system properties, configuration | |
| 801 | * file or anything else). If the developer doesn't configure any value for | |
| 802 | * the registered properties, the default value is used (if set). | |
| 803 | * | |
| 804 | * <pre> | |
| 805 | * .bindType() | |
| 806 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 807 | * .defaultValue(SmppBindType.RECEIVER) | |
| 808 | * </pre> | |
| 809 | * | |
| 810 | * <p> | |
| 811 | * Non-null value set using {@link #bindType(SmppBindType)} takes precedence | |
| 812 | * over property values and default value. | |
| 813 | * | |
| 814 | * <pre> | |
| 815 | * .bindType(SmppBindType.TRANSCEIVER) | |
| 816 | * .bindType() | |
| 817 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 818 | * .defaultValue(SmppBindType.RECEIVER) | |
| 819 | * </pre> | |
| 820 | * | |
| 821 | * The value {@code SmppBindType.TRANSCEIVER} is used regardless of the | |
| 822 | * value of the properties and default value. | |
| 823 | * | |
| 824 | * <p> | |
| 825 | * See {@link ConfigurationValueBuilder} for more information. | |
| 826 | * | |
| 827 | * | |
| 828 | * @return the builder to configure property keys/default value | |
| 829 | */ | |
| 830 | public ConfigurationValueBuilder<CloudhopperBuilder, SmppBindType> bindType() { | |
| 831 |
5
1. bindType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::bindType → KILLED 2. bindType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::bindType → KILLED 3. bindType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::bindType → KILLED 4. bindType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::bindType → KILLED 5. bindType : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::bindType → KILLED |
return bindTypeValueBuilder; |
| 832 | } | |
| 833 | ||
| 834 | /** | |
| 835 | * Configures how Cloudhopper will encode SMS messages. Charsets defined by | |
| 836 | * the SMPP protocol may be different from NIO charsets. | |
| 837 | * | |
| 838 | * <p> | |
| 839 | * The encoder will be used to transform Java {@link String} into a byte | |
| 840 | * array that is understandable by SMPP servers. | |
| 841 | * | |
| 842 | * <p> | |
| 843 | * This builder configures encoders for both messages that are split and | |
| 844 | * message that are not split. | |
| 845 | * | |
| 846 | * <p> | |
| 847 | * This builder allows to configure: | |
| 848 | * <ul> | |
| 849 | * <li>Enable/disable the standard GSM encoders (GSM 7-bit, GSM 8-bit and | |
| 850 | * UCS-2) as defined in | |
| 851 | * <a href="https://en.wikipedia.org/wiki/GSM_03.38">GSM 03.38 | |
| 852 | * specification</a>. It also allows to define different priority order</li> | |
| 853 | * <li>Enable/disable automatic guessing of encoding (based on previously | |
| 854 | * registered priorities).</li> | |
| 855 | * <li>Define a fallback encoder based on {@link Charset}</li> | |
| 856 | * <li>Provide custom {@link Encoder}s</li> | |
| 857 | * </ul> | |
| 858 | * | |
| 859 | * <pre> | |
| 860 | * {@code | |
| 861 | * .encoder() | |
| 862 | * .gsm7() | |
| 863 | * .properties("${ogham.sms.cloudhopper.encoder.gsm7bit-packed.priority}", "${ogham.sms.smpp.encoder.gsm7bit-packed.priority}") | |
| 864 | * .defaultValue(100000) | |
| 865 | * .and() | |
| 866 | * .gsm8() | |
| 867 | * .properties("${ogham.sms.cloudhopper.encoder.gsm8bit.priority}", "${ogham.sms.smpp.encoder.gsm8bit.priority}") | |
| 868 | * .defaultValue(99000) | |
| 869 | * .and() | |
| 870 | * .ucs2() | |
| 871 | * .properties("${ogham.sms.cloudhopper.encoder.ucs2.priority}", "${ogham.sms.smpp.encoder.ucs2.priority}") | |
| 872 | * .defaultValue(98000) | |
| 873 | * .and() | |
| 874 | * .autoGuess() | |
| 875 | * .properties("${ogham.sms.cloudhopper.encoder.auto-guess.enable}", "${ogham.sms.smpp.encoder.auto-guess.enable}") | |
| 876 | * .defaultValue(true) | |
| 877 | * .and() | |
| 878 | * .fallback() | |
| 879 | * .properties("${ogham.sms.cloudhopper.encoder.default-charset}", "${ogham.sms.smpp.encoder.default-charset}") | |
| 880 | * .defaultValue(CharsetUtil.NAME_GSM) | |
| 881 | * .and() | |
| 882 | * .customEncoder(new MyCustomEncoder(), 50000) | |
| 883 | * } | |
| 884 | * </pre> | |
| 885 | * | |
| 886 | * @return the builder to configure the encoder | |
| 887 | */ | |
| 888 | public EncoderBuilder encoder() { | |
| 889 |
5
1. encoder : negated conditional → KILLED 2. encoder : negated conditional → KILLED 3. encoder : negated conditional → KILLED 4. encoder : negated conditional → KILLED 5. encoder : negated conditional → KILLED |
if (encoderBuilder == null) { |
| 890 | encoderBuilder = new EncoderBuilder(this, buildContext); | |
| 891 |
5
1. encoder : removed call to fr/sii/ogham/sms/builder/cloudhopper/ReadableEncoderBuilder::update → KILLED 2. encoder : removed call to fr/sii/ogham/sms/builder/cloudhopper/ReadableEncoderBuilder::update → KILLED 3. encoder : removed call to fr/sii/ogham/sms/builder/cloudhopper/ReadableEncoderBuilder::update → KILLED 4. encoder : removed call to fr/sii/ogham/sms/builder/cloudhopper/ReadableEncoderBuilder::update → KILLED 5. encoder : removed call to fr/sii/ogham/sms/builder/cloudhopper/ReadableEncoderBuilder::update → KILLED |
sharedEncoderBuilder.update(encoderBuilder); |
| 892 | } | |
| 893 |
5
1. encoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::encoder → KILLED 2. encoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::encoder → KILLED 3. encoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::encoder → KILLED 4. encoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::encoder → KILLED 5. encoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::encoder → KILLED |
return encoderBuilder; |
| 894 | } | |
| 895 | ||
| 896 | /** | |
| 897 | * Configures how Cloudhopper will split messages. | |
| 898 | * | |
| 899 | * <p> | |
| 900 | * The splitter will check if the whole message can fit in a single segment. | |
| 901 | * If not the splitter will split the whole message in several segments with | |
| 902 | * a header to indicate splitting information such as number of segments, | |
| 903 | * reference number and current segment number. | |
| 904 | * | |
| 905 | * <p> | |
| 906 | * {@link Encoder} configured using {@link #encoder()} is used to encode | |
| 907 | * each segment. | |
| 908 | * | |
| 909 | * <p> | |
| 910 | * If automatic guessing of best standard encoder is enabled for | |
| 911 | * {@link Encoder} (using {@code encoder().autoGuess(true)}), and message | |
| 912 | * splitting is enabled, then standard message splitting is configured such | |
| 913 | * as: | |
| 914 | * <ul> | |
| 915 | * <li>If GSM 7-bit encoder is enabled, {@link GsmMessageSplitter} is used | |
| 916 | * to split messages that support this encoding. If whole message can fit in | |
| 917 | * a single segment of 160 characters. Longer message is split into segments | |
| 918 | * of either 153 characters or 152 characters (depending on reference number | |
| 919 | * generation, see {@link ReferenceNumberGenerator})</li> | |
| 920 | * <li>If GSM 8-bit encoder is enabled, {@link GsmMessageSplitter} is used | |
| 921 | * to split messages that support this encoding. If whole message can fit in | |
| 922 | * a single segment of 140 characters. Longer message is split into segments | |
| 923 | * of either 134 characters or 133 characters (depending on reference number | |
| 924 | * generation, see {@link ReferenceNumberGenerator})</li> | |
| 925 | * <li>If UCS-2 encoder is enabled, {@link GsmMessageSplitter} is used to | |
| 926 | * split messages that support this encoding. If whole message can fit in a | |
| 927 | * single segment of 70 characters. Longer message is split into segments of | |
| 928 | * either 67 characters or 66 characters (depending on reference number | |
| 929 | * generation, see {@link ReferenceNumberGenerator})</li> | |
| 930 | * </ul> | |
| 931 | * | |
| 932 | * Each registered splitter uses the same priority as associated | |
| 933 | * {@link Encoder}. | |
| 934 | * | |
| 935 | * If you don't want standard message splitting based on supported | |
| 936 | * {@link Encoder}s, you can either disable message splitting or provide a | |
| 937 | * custom splitter with higher priority. | |
| 938 | * | |
| 939 | * <p> | |
| 940 | * This builder allows to configure: | |
| 941 | * <ul> | |
| 942 | * <li>Enable/disable message splitting</li> | |
| 943 | * <li>Provide a custom split strategy</li> | |
| 944 | * <li>Choose strategy for reference number generation</li> | |
| 945 | * </ul> | |
| 946 | * | |
| 947 | * <p> | |
| 948 | * Examples of usage: | |
| 949 | * | |
| 950 | * <pre> | |
| 951 | * {@code | |
| 952 | * .splitter() | |
| 953 | * .enable() | |
| 954 | * .properties("${ogham.sms.cloudhopper.split.enable}", "${ogham.sms.smpp.split.enable}", "${ogham.sms.split.enable}") | |
| 955 | * .defaultValue(true) | |
| 956 | * .and() | |
| 957 | * .customSplitter(new MyCustomSplitter(), 100000) | |
| 958 | * .referenceNumber() | |
| 959 | * .random() | |
| 960 | * .random(new Random()) | |
| 961 | * .generator(new MyCustomReferenceNumberGenerator()) | |
| 962 | * } | |
| 963 | * </pre> | |
| 964 | * | |
| 965 | * @return the builder to configure message splitting | |
| 966 | */ | |
| 967 | public MessageSplitterBuilder splitter() { | |
| 968 |
5
1. splitter : negated conditional → KILLED 2. splitter : negated conditional → KILLED 3. splitter : negated conditional → KILLED 4. splitter : negated conditional → KILLED 5. splitter : negated conditional → KILLED |
if (messageSplitterBuilder == null) { |
| 969 | messageSplitterBuilder = new MessageSplitterBuilder(this, buildContext, sharedEncoderBuilder); | |
| 970 | } | |
| 971 |
5
1. splitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::splitter → KILLED 2. splitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::splitter → KILLED 3. splitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::splitter → KILLED 4. splitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::splitter → KILLED 5. splitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::splitter → KILLED |
return messageSplitterBuilder; |
| 972 | } | |
| 973 | ||
| 974 | /** | |
| 975 | * Configures Cloudhopper session management (timeouts, retry, session | |
| 976 | * name...). | |
| 977 | * | |
| 978 | * @return the builder to configure the session management | |
| 979 | */ | |
| 980 | public SessionBuilder session() { | |
| 981 |
5
1. session : negated conditional → KILLED 2. session : negated conditional → KILLED 3. session : negated conditional → KILLED 4. session : negated conditional → KILLED 5. session : negated conditional → KILLED |
if (sessionBuilder == null) { |
| 982 | sessionBuilder = new SessionBuilder(this, buildContext); | |
| 983 | } | |
| 984 |
5
1. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → KILLED 2. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → KILLED 3. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → KILLED 4. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → KILLED 5. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → KILLED |
return sessionBuilder; |
| 985 | } | |
| 986 | ||
| 987 | /** | |
| 988 | * Overrides any previously defined Cloudhopper parameters to use the | |
| 989 | * provided session. | |
| 990 | * | |
| 991 | * <p> | |
| 992 | * If this method is called several times, only the last session is used. | |
| 993 | * | |
| 994 | * @param session | |
| 995 | * the Cloudhopper session to use | |
| 996 | * @return this instance for fluent chaining | |
| 997 | */ | |
| 998 | public CloudhopperBuilder session(ExtendedSmppSessionConfiguration session) { | |
| 999 | this.sessionConfiguration = session; | |
| 1000 |
2
1. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → NO_COVERAGE 2. session : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::session → KILLED |
return this; |
| 1001 | } | |
| 1002 | ||
| 1003 | /** | |
| 1004 | * The address_range parameter is used in the bind_receiver and | |
| 1005 | * bind_transceiver command to specify a set of SME addresses serviced by | |
| 1006 | * the ESME client. A single SME address may also be specified in the | |
| 1007 | * address_range parameter. UNIX Regular Expression notation should be used | |
| 1008 | * to specify a range of addresses. Messages addressed to any destination in | |
| 1009 | * this range shall be routed to the ESME. | |
| 1010 | * | |
| 1011 | * Default to {@code null}. | |
| 1012 | * | |
| 1013 | * Note: For IP addresses, it is only possible to specify a single IP | |
| 1014 | * address. A range of IP addresses are not allowed. IP version 6.0 is not | |
| 1015 | * currently supported in this version of the protocol. | |
| 1016 | * | |
| 1017 | * Note: It is likely that the addr_range field is not supported or | |
| 1018 | * deliberately ignored on most Message Centres. The reason for this is that | |
| 1019 | * most carriers will not allow an ESME control the message routing as this | |
| 1020 | * can carry the risk of mis-routing messages. In such circumstances, the | |
| 1021 | * ESME will be requested to set the field to NULL. | |
| 1022 | * | |
| 1023 | * @param range | |
| 1024 | * the address range | |
| 1025 | * @return this instance for fluent chaining | |
| 1026 | */ | |
| 1027 | public CloudhopperBuilder addressRange(Address range) { | |
| 1028 | this.addressRange = range; | |
| 1029 |
1
1. addressRange : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::addressRange → NO_COVERAGE |
return this; |
| 1030 | } | |
| 1031 | ||
| 1032 | /** | |
| 1033 | * Enable or disable SSL configuration and configure how SSL is handled. | |
| 1034 | * | |
| 1035 | * See <a href= | |
| 1036 | * "https://github.com/fizzed/cloudhopper-smpp/blob/master/SSL.md">How to | |
| 1037 | * use SSL with cloudhopper-smpp</a> | |
| 1038 | * | |
| 1039 | * @return the builder to configure SSL | |
| 1040 | */ | |
| 1041 | public SslBuilder ssl() { | |
| 1042 |
1
1. ssl : negated conditional → NO_COVERAGE |
if (sslBuilder == null) { |
| 1043 | sslBuilder = new SslBuilder(this, buildContext); | |
| 1044 | } | |
| 1045 |
1
1. ssl : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::ssl → NO_COVERAGE |
return sslBuilder; |
| 1046 | } | |
| 1047 | ||
| 1048 | /** | |
| 1049 | * Configure logs: | |
| 1050 | * <ul> | |
| 1051 | * <li>Enable/disable log of {@link Pdu}s</li> | |
| 1052 | * <li>Enable/disable log of bytes</li> | |
| 1053 | * </ul> | |
| 1054 | * | |
| 1055 | * @return the builder to enable/disable some logs | |
| 1056 | */ | |
| 1057 | public LoggingBuilder logging() { | |
| 1058 |
1
1. logging : negated conditional → NO_COVERAGE |
if (loggingBuilder == null) { |
| 1059 | loggingBuilder = new LoggingBuilder(this); | |
| 1060 | } | |
| 1061 |
1
1. logging : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::logging → NO_COVERAGE |
return loggingBuilder; |
| 1062 | } | |
| 1063 | ||
| 1064 | /** | |
| 1065 | * By default, {@link CloudhopperSMPPSender} uses {@link DefaultSmppClient} | |
| 1066 | * client. This option provides a way to use another {@link SmppClient}. | |
| 1067 | * | |
| 1068 | * @param supplier | |
| 1069 | * an implementation that provides an instance of a | |
| 1070 | * {@link SmppClient} | |
| 1071 | * @return this instance for fluent chaining | |
| 1072 | */ | |
| 1073 | public CloudhopperBuilder clientSupplier(SmppClientSupplier supplier) { | |
| 1074 | this.clientSupplier = supplier; | |
| 1075 |
2
1. clientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::clientSupplier → NO_COVERAGE 2. clientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::clientSupplier → KILLED |
return this; |
| 1076 | } | |
| 1077 | ||
| 1078 | /** | |
| 1079 | * By default, {@link CloudhopperSMPPSender} uses | |
| 1080 | * {@link DefaultSmppSessionHandler}. This option provides a way to use | |
| 1081 | * another {@link SmppSessionHandler}. | |
| 1082 | * | |
| 1083 | * @param supplier | |
| 1084 | * an implementation that provides an instance of a | |
| 1085 | * {@link SmppSessionHandler} | |
| 1086 | * @return this instance for fluent chaining | |
| 1087 | */ | |
| 1088 | public CloudhopperBuilder smppSessionHandlerSupplier(SmppSessionHandlerSupplier supplier) { | |
| 1089 | this.smppSessionHandler = supplier; | |
| 1090 |
1
1. smppSessionHandlerSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::smppSessionHandlerSupplier → NO_COVERAGE |
return this; |
| 1091 | } | |
| 1092 | ||
| 1093 | /** | |
| 1094 | * {@link Sms} message is converted to {@link SubmitSm}(s) using a | |
| 1095 | * {@link MessagePreparator}. | |
| 1096 | * | |
| 1097 | * <p> | |
| 1098 | * You can provide a custom {@link MessagePreparator} instance if the | |
| 1099 | * default behavior doesn't fit your needs. | |
| 1100 | * </p> | |
| 1101 | * | |
| 1102 | * <p> | |
| 1103 | * If a custom {@link MessagePreparator} is set, any other preparator (using | |
| 1104 | * {@link #userData()}) is not used. | |
| 1105 | * </p> | |
| 1106 | * | |
| 1107 | * <p> | |
| 1108 | * If this method is called several times, only the last value is used. | |
| 1109 | * </p> | |
| 1110 | * | |
| 1111 | * <p> | |
| 1112 | * If {@code null} value is provided, then custom {@link MessagePreparator} | |
| 1113 | * is disabled. Other configured preparators are used (using | |
| 1114 | * {@link #userData()}). | |
| 1115 | * </p> | |
| 1116 | * | |
| 1117 | * @param preparator | |
| 1118 | * the custom preprator instance | |
| 1119 | * @return this instance for fluent chaining | |
| 1120 | * @see #userData() | |
| 1121 | */ | |
| 1122 | public CloudhopperBuilder messagePreparator(MessagePreparator preparator) { | |
| 1123 | this.preparator = preparator; | |
| 1124 |
1
1. messagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::messagePreparator → NO_COVERAGE |
return this; |
| 1125 | } | |
| 1126 | ||
| 1127 | /** | |
| 1128 | * SMS message (named "User Data" in SMPP specification) can be transmitted | |
| 1129 | * using: | |
| 1130 | * <ul> | |
| 1131 | * <li>Either {@code short_message} field (standard field for "User | |
| 1132 | * Data").</li> | |
| 1133 | * <li>Or {@code message_payload} optional parameter.</li> | |
| 1134 | * </ul> | |
| 1135 | * | |
| 1136 | * <p> | |
| 1137 | * This builder allow to configure which strategy to use for sending | |
| 1138 | * message: | |
| 1139 | * <ul> | |
| 1140 | * <li>Either use {@code short_message} field</li> | |
| 1141 | * <li>Or use {@code message_payload} field</li> | |
| 1142 | * </ul> | |
| 1143 | * | |
| 1144 | * <p> | |
| 1145 | * The result of {@link #userData()} configuration affects the message | |
| 1146 | * preparation strategy. | |
| 1147 | * </p> | |
| 1148 | * | |
| 1149 | * <p> | |
| 1150 | * Examples of usage: | |
| 1151 | * | |
| 1152 | * <pre> | |
| 1153 | * {@code | |
| 1154 | * .userData() | |
| 1155 | * .useShortMessage() | |
| 1156 | * .properties("${ogham.sms.cloudhopper.user-data.use-short-message}", "${ogham.sms.smpp.user-data.use-short-message}") | |
| 1157 | * .defaultValue(true) | |
| 1158 | * .and() | |
| 1159 | * .useTlvMessagePayload() | |
| 1160 | * .properties("${ogham.sms.cloudhopper.user-data.use-tlv-message-payload}", "${ogham.sms.smpp.user-data.use-tlv-message-payload}") | |
| 1161 | * .defaultValue(false) | |
| 1162 | * } | |
| 1163 | * </pre> | |
| 1164 | * | |
| 1165 | * If any of {@code ogham.sms.cloudhopper.user-data.use-short-message} | |
| 1166 | * property or {@code ogham.sms.user-data.use-short-message} property is set | |
| 1167 | * to true, it uses {@code short_message} field. | |
| 1168 | * | |
| 1169 | * If any of {@code ogham.sms.cloudhopper.user-data.use-tlv-message-payload} | |
| 1170 | * property or {@code ogham.sms.user-data.use-tlv-message-payload} property | |
| 1171 | * is set to true, it uses {@code message_payload} field. | |
| 1172 | * | |
| 1173 | * If none of the above properties is set, it uses {@code short_message} | |
| 1174 | * field is used (last value of {@code shortMessage} is set to | |
| 1175 | * {@code "true"}). | |
| 1176 | * | |
| 1177 | * <p> | |
| 1178 | * If {@link #userData()} is not configured at all, then default behavior is | |
| 1179 | * used ({@code short_message} field is used). | |
| 1180 | * </p> | |
| 1181 | * | |
| 1182 | * @return the builder to configure how the "User Data" is sent | |
| 1183 | */ | |
| 1184 | public UserDataBuilder userData() { | |
| 1185 |
5
1. userData : negated conditional → KILLED 2. userData : negated conditional → KILLED 3. userData : negated conditional → KILLED 4. userData : negated conditional → KILLED 5. userData : negated conditional → KILLED |
if (userDataBuilder == null) { |
| 1186 | userDataBuilder = new UserDataBuilder(this, buildContext); | |
| 1187 | } | |
| 1188 |
5
1. userData : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::userData → KILLED 2. userData : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::userData → KILLED 3. userData : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::userData → KILLED 4. userData : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::userData → KILLED 5. userData : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::userData → KILLED |
return userDataBuilder; |
| 1189 | } | |
| 1190 | ||
| 1191 | /** | |
| 1192 | * Data Coding Scheme is a one-octet field in Short Messages (SM) and Cell | |
| 1193 | * Broadcast Messages (CB) which carries a basic information how the | |
| 1194 | * recipient handset should process the received message. The information | |
| 1195 | * includes: | |
| 1196 | * <ul> | |
| 1197 | * <li>the character set or message coding which determines the encoding of | |
| 1198 | * the message user data</li> | |
| 1199 | * <li>the message class which determines to which component of the Mobile | |
| 1200 | * Station (MS) or User Equipment (UE) should be the message delivered</li> | |
| 1201 | * <li>the request to automatically delete the message after reading</li> | |
| 1202 | * <li>the state of flags indicating presence of unread voicemail, fax, | |
| 1203 | * e-mail or other messages</li> | |
| 1204 | * <li>the indication that the message content is compressed</li> | |
| 1205 | * <li>the language of the cell broadcast message</li> | |
| 1206 | * </ul> | |
| 1207 | * The field is described in 3GPP 23.040 and 3GPP 23.038 under the name | |
| 1208 | * TP-DCS (see <a href= | |
| 1209 | * "https://en.wikipedia.org/wiki/Data_Coding_Scheme#SMS_Data_Coding_Scheme">SMS | |
| 1210 | * Data Coding Scheme</a>). | |
| 1211 | * | |
| 1212 | * SMPP 3.4 introduced a new list of {@code data_coding} values (see | |
| 1213 | * <a href="https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer">Short | |
| 1214 | * Message Peer to Peer</a>). | |
| 1215 | * | |
| 1216 | * <p> | |
| 1217 | * This builder allows to configure how Data Coding Scheme value is | |
| 1218 | * determined: | |
| 1219 | * <ul> | |
| 1220 | * <li>Use automatic mode base on interface version (see | |
| 1221 | * {@link #interfaceVersion(InterfaceVersion)} and | |
| 1222 | * {@link #interfaceVersion(Byte)}) and charset encoding (see | |
| 1223 | * {@link #encoder()}) used to encode the message ("User Data")</li> | |
| 1224 | * <li>Use a fixed value used for every message</li> | |
| 1225 | * <li>Use a custom implementation</li> | |
| 1226 | * </ul> | |
| 1227 | * | |
| 1228 | * <p> | |
| 1229 | * Examples of usage: | |
| 1230 | * | |
| 1231 | * <pre> | |
| 1232 | * {@code | |
| 1233 | * .dataCodingScheme() | |
| 1234 | * .auto("${ogham.sms.cloudhopper.data-coding-scheme.auto.enable}", "${ogham.sms.smpp.data-coding-scheme.auto.enable}") | |
| 1235 | * .value("${ogham.sms.cloudhopper.data-coding-scheme.value}", "${ogham.sms.smpp.data-coding-scheme.value}") | |
| 1236 | * .custom(new MyCustomDataCodingProvider()) | |
| 1237 | * } | |
| 1238 | * </pre> | |
| 1239 | * | |
| 1240 | * See {@link DataCodingSchemeBuilder#auto(Boolean)}, | |
| 1241 | * {@link DataCodingSchemeBuilder#value(Byte)} and | |
| 1242 | * {@link DataCodingSchemeBuilder#custom(DataCodingProvider)} for more | |
| 1243 | * information. | |
| 1244 | * | |
| 1245 | * | |
| 1246 | * @return the builder to configure how to determine Data Coding Scheme | |
| 1247 | * value | |
| 1248 | */ | |
| 1249 | public DataCodingSchemeBuilder dataCodingScheme() { | |
| 1250 |
5
1. dataCodingScheme : negated conditional → KILLED 2. dataCodingScheme : negated conditional → KILLED 3. dataCodingScheme : negated conditional → KILLED 4. dataCodingScheme : negated conditional → KILLED 5. dataCodingScheme : negated conditional → KILLED |
if (dataCodingBuilder == null) { |
| 1251 | dataCodingBuilder = new DataCodingSchemeBuilder(this, buildContext, this::getInterfaceVersion); | |
| 1252 | } | |
| 1253 |
5
1. dataCodingScheme : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::dataCodingScheme → KILLED 2. dataCodingScheme : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::dataCodingScheme → KILLED 3. dataCodingScheme : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::dataCodingScheme → KILLED 4. dataCodingScheme : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::dataCodingScheme → KILLED 5. dataCodingScheme : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::dataCodingScheme → KILLED |
return dataCodingBuilder; |
| 1254 | } | |
| 1255 | ||
| 1256 | @Override | |
| 1257 | public CloudhopperSMPPSender build() { | |
| 1258 | CloudhopperSessionOptions sessionOpts = buildSessionOpts(); | |
| 1259 | ExtendedSmppSessionConfiguration configuration = buildSessionConfiguration(sessionOpts); | |
| 1260 |
10
1. build : negated conditional → TIMED_OUT 2. build : negated conditional → KILLED 3. build : negated conditional → KILLED 4. build : negated conditional → KILLED 5. build : negated conditional → KILLED 6. build : negated conditional → KILLED 7. build : negated conditional → KILLED 8. build : negated conditional → KILLED 9. build : negated conditional → KILLED 10. build : negated conditional → KILLED |
if (configuration.getHost() == null || configuration.getPort() == 0) { |
| 1261 | return null; | |
| 1262 | } | |
| 1263 | LOG.info("Sending SMS using Cloudhopper is registered"); | |
| 1264 | LOG.debug("SMPP server address: {}:{}", configuration.getHost(), configuration.getPort()); | |
| 1265 | SessionHandlingStrategy sessionHandler = buildSessionHandlingStrategy(configuration); | |
| 1266 |
5
1. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::build → KILLED 2. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::build → KILLED 3. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::build → KILLED 4. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::build → KILLED 5. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::build → KILLED |
return buildContext.register(new CloudhopperSMPPSender(configuration, sessionHandler, buildPreparator())); |
| 1267 | } | |
| 1268 | ||
| 1269 | private CloudhopperSessionOptions buildSessionOpts() { | |
| 1270 |
2
1. buildSessionOpts : negated conditional → SURVIVED 2. buildSessionOpts : negated conditional → KILLED |
if (sessionBuilder != null) { |
| 1271 |
5
1. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → KILLED 2. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → KILLED 3. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → KILLED 4. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → KILLED 5. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → KILLED |
return sessionBuilder.build(); |
| 1272 | } | |
| 1273 | CloudhopperSessionOptions cloudhopperSessionOptions = buildContext.register(new CloudhopperSessionOptions()); | |
| 1274 |
2
1. buildSessionOpts : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperSessionOptions::setConnectRetry → NO_COVERAGE 2. buildSessionOpts : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperSessionOptions::setConnectRetry → SURVIVED |
cloudhopperSessionOptions.setConnectRetry(buildConnectRetry(cloudhopperSessionOptions)); |
| 1275 |
2
1. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → NO_COVERAGE 2. buildSessionOpts : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionOpts → KILLED |
return cloudhopperSessionOptions; |
| 1276 | } | |
| 1277 | ||
| 1278 | private SessionHandlingStrategy buildSessionHandlingStrategy(ExtendedSmppSessionConfiguration configuration) { | |
| 1279 |
4
1. buildSessionHandlingStrategy : negated conditional → SURVIVED 2. buildSessionHandlingStrategy : negated conditional → SURVIVED 3. buildSessionHandlingStrategy : negated conditional → KILLED 4. buildSessionHandlingStrategy : negated conditional → KILLED |
if (configuration.getKeepAlive() != null && configuration.getKeepAlive().isEnable(false)) { |
| 1280 |
2
1. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → NO_COVERAGE 2. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → KILLED |
return buildKeepAliveHandler(configuration); |
| 1281 | } | |
| 1282 |
4
1. buildSessionHandlingStrategy : negated conditional → SURVIVED 2. buildSessionHandlingStrategy : negated conditional → SURVIVED 3. buildSessionHandlingStrategy : negated conditional → KILLED 4. buildSessionHandlingStrategy : negated conditional → KILLED |
if (configuration.getReuseSession() != null && configuration.getReuseSession().isEnable(false)) { |
| 1283 |
2
1. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → NO_COVERAGE 2. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → KILLED |
return buildReuseSessionHandler(configuration); |
| 1284 | } | |
| 1285 |
5
1. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → SURVIVED 2. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → KILLED 3. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → KILLED 4. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → KILLED 5. buildSessionHandlingStrategy : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionHandlingStrategy → KILLED |
return buildAlwaysNewSessionHandler(configuration); |
| 1286 | } | |
| 1287 | ||
| 1288 | private SessionHandlingStrategy buildKeepAliveHandler(ExtendedSmppSessionConfiguration configuration) { | |
| 1289 |
2
1. buildKeepAliveHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildKeepAliveHandler → NO_COVERAGE 2. buildKeepAliveHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildKeepAliveHandler → KILLED |
return new KeepSessionAliveStrategy(configuration, buildClientSupplier(), buildSmppSessionHandler(), configuration.getConnectRetry(), configuration.getKeepAlive().getExecutor(), buildKeepAliveErrorAnalyzer(configuration.getKeepAlive()), buildReconnectionErrorHandler()); |
| 1290 | } | |
| 1291 | | |
| 1292 | private ErrorAnalyzer buildKeepAliveErrorAnalyzer(KeepAliveOptions options) { | |
| 1293 |
2
1. buildKeepAliveErrorAnalyzer : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildKeepAliveErrorAnalyzer → NO_COVERAGE 2. buildKeepAliveErrorAnalyzer : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildKeepAliveErrorAnalyzer → TIMED_OUT |
return new DefaultErrorAnalyzer(options.getMaxConsecutiveTimeouts()); |
| 1294 | } | |
| 1295 | | |
| 1296 | private ErrorHandler buildReconnectionErrorHandler() { | |
| 1297 | // TODO: make this configurable ? | |
| 1298 |
2
1. buildReconnectionErrorHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildReconnectionErrorHandler → NO_COVERAGE 2. buildReconnectionErrorHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildReconnectionErrorHandler → SURVIVED |
return new LogErrorHandler("Failed to reconnect", Level.ERROR); |
| 1299 | } | |
| 1300 | ||
| 1301 | private SessionHandlingStrategy buildReuseSessionHandler(ExtendedSmppSessionConfiguration configuration) { | |
| 1302 |
2
1. buildReuseSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildReuseSessionHandler → NO_COVERAGE 2. buildReuseSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildReuseSessionHandler → KILLED |
return new MayReuseSessionStrategy(configuration, buildClientSupplier(), buildSmppSessionHandler(), configuration.getConnectRetry(), buildReuseSessionErrorAnalyzer()); |
| 1303 | } | |
| 1304 | | |
| 1305 | private ErrorAnalyzer buildReuseSessionErrorAnalyzer() { | |
| 1306 |
2
1. buildReuseSessionErrorAnalyzer : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildReuseSessionErrorAnalyzer → NO_COVERAGE 2. buildReuseSessionErrorAnalyzer : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildReuseSessionErrorAnalyzer → KILLED |
return new DefaultErrorAnalyzer(1); |
| 1307 | } | |
| 1308 | ||
| 1309 | private SessionHandlingStrategy buildAlwaysNewSessionHandler(ExtendedSmppSessionConfiguration configuration) { | |
| 1310 |
5
1. buildAlwaysNewSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildAlwaysNewSessionHandler → SURVIVED 2. buildAlwaysNewSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildAlwaysNewSessionHandler → KILLED 3. buildAlwaysNewSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildAlwaysNewSessionHandler → KILLED 4. buildAlwaysNewSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildAlwaysNewSessionHandler → KILLED 5. buildAlwaysNewSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildAlwaysNewSessionHandler → KILLED |
return new AlwaysNewSessionStrategy(configuration, buildClientSupplier(), buildSmppSessionHandler(), configuration.getConnectRetry()); |
| 1311 | } | |
| 1312 | ||
| 1313 | private RetryExecutor buildConnectRetry(CloudhopperSessionOptions sessionOpts) { | |
| 1314 |
3
1. buildConnectRetry : negated conditional → SURVIVED 2. buildConnectRetry : negated conditional → KILLED 3. buildConnectRetry : negated conditional → KILLED |
if (sessionOpts.getConnectRetry() == null) { |
| 1315 |
3
1. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → NO_COVERAGE 2. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → KILLED 3. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → KILLED |
return noRetry(); |
| 1316 | } | |
| 1317 |
5
1. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → SURVIVED 2. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → KILLED 3. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → KILLED 4. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → KILLED 5. buildConnectRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildConnectRetry → KILLED |
return sessionOpts.getConnectRetry(); |
| 1318 | } | |
| 1319 | | |
| 1320 | private SimpleRetryExecutor noRetry() { | |
| 1321 |
3
1. noRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::noRetry → NO_COVERAGE 2. noRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::noRetry → KILLED 3. noRetry : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::noRetry → KILLED |
return buildContext.register(new SimpleRetryExecutor(() -> null, buildContext.register(new ThreadSleepAwaiter()))); |
| 1322 | } | |
| 1323 | ||
| 1324 | private MessagePreparator buildPreparator() { | |
| 1325 |
5
1. buildPreparator : negated conditional → KILLED 2. buildPreparator : negated conditional → KILLED 3. buildPreparator : negated conditional → KILLED 4. buildPreparator : negated conditional → KILLED 5. buildPreparator : negated conditional → KILLED |
if (preparator != null) { |
| 1326 |
1
1. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → NO_COVERAGE |
return preparator; |
| 1327 | } | |
| 1328 |
3
1. buildPreparator : negated conditional → SURVIVED 2. buildPreparator : negated conditional → KILLED 3. buildPreparator : negated conditional → KILLED |
if (userDataBuilder != null) { |
| 1329 | UserDataPropValues values = userDataBuilder.build(); | |
| 1330 |
3
1. buildPreparator : negated conditional → SURVIVED 2. buildPreparator : negated conditional → KILLED 3. buildPreparator : negated conditional → KILLED |
if (values.isUseShortMessage()) { |
| 1331 |
5
1. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED 2. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED 3. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED 4. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED 5. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED |
return buildShortMessagePreparator(); |
| 1332 | } | |
| 1333 |
3
1. buildPreparator : negated conditional → NO_COVERAGE 2. buildPreparator : negated conditional → KILLED 3. buildPreparator : negated conditional → KILLED |
if (values.isUseTlvMessagePayload()) { |
| 1334 |
3
1. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → NO_COVERAGE 2. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED 3. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED |
return buildTlvMessagePayloadMessagePreparator(); |
| 1335 | } | |
| 1336 | } | |
| 1337 |
2
1. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → NO_COVERAGE 2. buildPreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPreparator → KILLED |
return buildShortMessagePreparator(); |
| 1338 | } | |
| 1339 | ||
| 1340 | private MessagePreparator buildShortMessagePreparator() { | |
| 1341 |
5
1. buildShortMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildShortMessagePreparator → KILLED 2. buildShortMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildShortMessagePreparator → KILLED 3. buildShortMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildShortMessagePreparator → KILLED 4. buildShortMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildShortMessagePreparator → KILLED 5. buildShortMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildShortMessagePreparator → KILLED |
return buildContext.register(new ShortMessagePreparator(buildSplitter(buildEncoder()), buildDataCodingProvider(), buildPhoneNumberTranslator())); |
| 1342 | } | |
| 1343 | ||
| 1344 | private MessagePreparator buildTlvMessagePayloadMessagePreparator() { | |
| 1345 |
3
1. buildTlvMessagePayloadMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildTlvMessagePayloadMessagePreparator → NO_COVERAGE 2. buildTlvMessagePayloadMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildTlvMessagePayloadMessagePreparator → KILLED 3. buildTlvMessagePayloadMessagePreparator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildTlvMessagePayloadMessagePreparator → KILLED |
return buildContext.register(new TlvMessagePayloadMessagePreparator(buildSplitter(buildEncoder()), buildDataCodingProvider(), buildPhoneNumberTranslator())); |
| 1346 | } | |
| 1347 | ||
| 1348 | private Encoder buildEncoder() { | |
| 1349 |
2
1. buildEncoder : negated conditional → SURVIVED 2. buildEncoder : negated conditional → KILLED |
if (encoderBuilder == null) { |
| 1350 |
2
1. buildEncoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildEncoder → NO_COVERAGE 2. buildEncoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildEncoder → KILLED |
return buildContext.register(new CloudhopperCharsetSupportingEncoder(NamedCharset.from(DEFAULT_CHARSET))); |
| 1351 | } | |
| 1352 |
2
1. buildEncoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildEncoder → SURVIVED 2. buildEncoder : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildEncoder → KILLED |
return encoderBuilder.build(); |
| 1353 | } | |
| 1354 | ||
| 1355 | private DataCodingProvider buildDataCodingProvider() { | |
| 1356 |
2
1. buildDataCodingProvider : negated conditional → SURVIVED 2. buildDataCodingProvider : negated conditional → KILLED |
if (dataCodingBuilder == null) { |
| 1357 |
2
1. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → NO_COVERAGE 2. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → KILLED |
return buildContext.register(new CharsetMapToCharacterEncodingGroupDataCodingProvider(true)); |
| 1358 | } | |
| 1359 |
5
1. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → SURVIVED 2. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → KILLED 3. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → KILLED 4. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → KILLED 5. buildDataCodingProvider : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildDataCodingProvider → KILLED |
return dataCodingBuilder.build(); |
| 1360 | } | |
| 1361 | ||
| 1362 | private MessageSplitter buildSplitter(Encoder encoder) { | |
| 1363 |
4
1. buildSplitter : negated conditional → SURVIVED 2. buildSplitter : negated conditional → KILLED 3. buildSplitter : negated conditional → KILLED 4. buildSplitter : negated conditional → KILLED |
if (messageSplitterBuilder == null) { |
| 1364 |
2
1. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → NO_COVERAGE 2. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → KILLED |
return buildContext.register(new NoSplitMessageSplitter(encoder)); |
| 1365 | } | |
| 1366 | MessageSplitter splitter = messageSplitterBuilder.build(); | |
| 1367 |
4
1. buildSplitter : negated conditional → SURVIVED 2. buildSplitter : negated conditional → KILLED 3. buildSplitter : negated conditional → KILLED 4. buildSplitter : negated conditional → KILLED |
if (splitter != null) { |
| 1368 |
5
1. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → SURVIVED 2. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → KILLED 3. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → KILLED 4. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → KILLED 5. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → KILLED |
return splitter; |
| 1369 | } | |
| 1370 |
2
1. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → NO_COVERAGE 2. buildSplitter : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSplitter → KILLED |
return buildContext.register(new NoSplitMessageSplitter(encoder)); |
| 1371 | } | |
| 1372 | ||
| 1373 | private SmppClientSupplier buildClientSupplier() { | |
| 1374 |
5
1. buildClientSupplier : negated conditional → SURVIVED 2. buildClientSupplier : negated conditional → KILLED 3. buildClientSupplier : negated conditional → KILLED 4. buildClientSupplier : negated conditional → KILLED 5. buildClientSupplier : negated conditional → KILLED |
if (clientSupplier == null) { |
| 1375 |
5
1. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → SURVIVED 2. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → KILLED 3. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → KILLED 4. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → KILLED 5. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → KILLED |
return buildContext.register(DefaultSmppClient::new); |
| 1376 | } | |
| 1377 |
2
1. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → NO_COVERAGE 2. buildClientSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildClientSupplier → KILLED |
return clientSupplier; |
| 1378 | } | |
| 1379 | ||
| 1380 | private SmppSessionHandlerSupplier buildSmppSessionHandler() { | |
| 1381 |
3
1. buildSmppSessionHandler : negated conditional → SURVIVED 2. buildSmppSessionHandler : negated conditional → TIMED_OUT 3. buildSmppSessionHandler : negated conditional → KILLED |
if (smppSessionHandler == null) { |
| 1382 |
3
1. buildSmppSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSmppSessionHandler → SURVIVED 2. buildSmppSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSmppSessionHandler → TIMED_OUT 3. buildSmppSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSmppSessionHandler → KILLED |
return defaultSmppSessionHandlerSupplier(); |
| 1383 | } | |
| 1384 |
1
1. buildSmppSessionHandler : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSmppSessionHandler → NO_COVERAGE |
return smppSessionHandler; |
| 1385 | } | |
| 1386 | | |
| 1387 | private SmppSessionHandlerSupplier defaultSmppSessionHandlerSupplier() { | |
| 1388 |
5
1. defaultSmppSessionHandlerSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::defaultSmppSessionHandlerSupplier → SURVIVED 2. lambda$defaultSmppSessionHandlerSupplier$1 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$defaultSmppSessionHandlerSupplier$1 → NO_COVERAGE 3. lambda$defaultSmppSessionHandlerSupplier$1 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$defaultSmppSessionHandlerSupplier$1 → SURVIVED 4. defaultSmppSessionHandlerSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::defaultSmppSessionHandlerSupplier → TIMED_OUT 5. defaultSmppSessionHandlerSupplier : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::defaultSmppSessionHandlerSupplier → KILLED |
return () -> new RespondToEnquireLinkRequestHandler(new RespondToDeliveryReceiptHandler(new DefaultSmppSessionHandler())); |
| 1389 | } | |
| 1390 | ||
| 1391 | private PhoneNumberTranslator buildPhoneNumberTranslator() { | |
| 1392 | // TODO: allow configuration of fallback phone number translator | |
| 1393 |
2
1. buildPhoneNumberTranslator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPhoneNumberTranslator → SURVIVED 2. buildPhoneNumberTranslator : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildPhoneNumberTranslator → KILLED |
return buildContext.register(new CompositePhoneNumberTranslator(buildContext.register(new DefaultHandler()))); |
| 1394 | } | |
| 1395 | ||
| 1396 | private ExtendedSmppSessionConfiguration buildSessionConfiguration(CloudhopperSessionOptions sessionOpts) { | |
| 1397 | ExtendedSmppSessionConfiguration session = buildContext.register(new ExtendedSmppSessionConfiguration()); | |
| 1398 |
5
1. buildSessionConfiguration : negated conditional → KILLED 2. buildSessionConfiguration : negated conditional → KILLED 3. buildSessionConfiguration : negated conditional → KILLED 4. buildSessionConfiguration : negated conditional → KILLED 5. buildSessionConfiguration : negated conditional → KILLED |
ExtendedSmppSessionConfiguration manual = sessionConfiguration == null ? new ExtendedSmppSessionConfiguration() : sessionConfiguration; |
| 1399 | // @formatter:off | |
| 1400 |
2
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. lambda$buildSessionConfiguration$2 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$2 → NO_COVERAGE |
merge(session::setType, bindTypeValueBuilder::getValue, manual::getType, () -> DEFAULT_BIND_TYPE); |
| 1401 |
5
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 2. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 3. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 4. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 5. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED |
merge(session::setHost, hostValueBuilder::getValue, manual::getHost); |
| 1402 |
5
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 2. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 3. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 4. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 5. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED |
merge(session::setPort, portValueBuilder::getValue, manual::getPort, () -> 0); |
| 1403 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setSystemId, systemIdValueBuilder::getValue, manual::getSystemId); |
| 1404 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setPassword, passwordValueBuilder::getValue, manual::getPassword); |
| 1405 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setSystemType, systemTypeValueBuilder::getValue, manual::getSystemType); |
| 1406 |
2
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED |
merge(session::setBindTimeout, sessionOpts::getBindTimeout, considerZeroAsDefault(manual::getBindTimeout)); |
| 1407 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setConnectTimeout, sessionOpts::getConnectTimeout, considerZeroAsDefault(manual::getConnectTimeout)); |
| 1408 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setInterfaceVersion, this::getInterfaceVersion, manual::getInterfaceVersion); |
| 1409 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setName, sessionOpts::getSessionName, manual::getName); |
| 1410 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setRequestExpiryTimeout, sessionOpts::getRequestExpiryTimeout, considerZeroAsDefault(manual::getRequestExpiryTimeout)); |
| 1411 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setWindowMonitorInterval, sessionOpts::getWindowMonitorInterval, considerZeroAsDefault(manual::getWindowMonitorInterval)); |
| 1412 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setWindowSize, sessionOpts::getWindowSize, considerZeroAsDefault(manual::getWindowSize)); |
| 1413 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setWindowWaitTimeout, sessionOpts::getWindowWaitTimeout, considerZeroAsDefault(manual::getWindowWaitTimeout)); |
| 1414 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED |
merge(session::setWriteTimeout, sessionOpts::getWriteTimeout, considerZeroAsDefault(manual::getWriteTimeout)); |
| 1415 |
7
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. lambda$buildSessionConfiguration$4 : replaced Long return value with 0L for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$4 → NO_COVERAGE 3. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 4. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 5. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 6. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 7. lambda$buildSessionConfiguration$4 : replaced Long return value with 0L for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$4 → KILLED |
merge(session::setResponseTimeout, sessionOpts::getResponseTimeout, considerZeroAsDefault(manual::getResponseTimeout), () -> DEFAULT_RESPONSE_TIMEOUT); |
| 1416 |
3
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. lambda$buildSessionConfiguration$5 : replaced Long return value with 0L for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$5 → NO_COVERAGE 3. lambda$buildSessionConfiguration$5 : replaced Long return value with 0L for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$5 → SURVIVED |
merge(session::setUnbindTimeout, sessionOpts::getUnbindTimeout, considerZeroAsDefault(manual::getUnbindTimeout), () -> DEFAULT_UNBIND_TIMEOUT); |
| 1417 |
2
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED |
merge(session::setReuseSession, sessionOpts::getReuseSession, manual::getReuseSession); |
| 1418 |
2
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. lambda$buildSessionConfiguration$6 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$6 → SURVIVED |
merge(session::setAddressRange, () -> addressRange, manual::getAddressRange); |
| 1419 |
2
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → TIMED_OUT |
merge(session::setKeepAlive, sessionOpts::getKeepAlive, manual::getKeepAlive); |
| 1420 |
10
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → SURVIVED 2. lambda$buildSessionConfiguration$7 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$7 → SURVIVED 3. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 4. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 5. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 6. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::merge → KILLED 7. lambda$buildSessionConfiguration$7 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$7 → KILLED 8. lambda$buildSessionConfiguration$7 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$7 → KILLED 9. lambda$buildSessionConfiguration$7 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$7 → KILLED 10. lambda$buildSessionConfiguration$7 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$buildSessionConfiguration$7 → KILLED |
merge(session::setConnectRetry, () -> buildConnectRetry(sessionOpts), manual::getConnectRetry); |
| 1421 | // @formatter:on | |
| 1422 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::configureSsl → SURVIVED |
configureSsl(session); |
| 1423 |
1
1. buildSessionConfiguration : removed call to fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::configureLogs → SURVIVED |
configureLogs(session); |
| 1424 |
5
1. buildSessionConfiguration : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionConfiguration → KILLED 2. buildSessionConfiguration : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionConfiguration → KILLED 3. buildSessionConfiguration : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionConfiguration → KILLED 4. buildSessionConfiguration : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionConfiguration → KILLED 5. buildSessionConfiguration : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::buildSessionConfiguration → KILLED |
return session; |
| 1425 | } | |
| 1426 | ||
| 1427 | private static <T> Supplier<T> considerZeroAsDefault(Supplier<T> getter) { | |
| 1428 | T value = getter.get(); | |
| 1429 |
2
1. considerZeroAsDefault : negated conditional → SURVIVED 2. considerZeroAsDefault : negated conditional → KILLED |
if (value instanceof Long) { |
| 1430 |
6
1. considerZeroAsDefault : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::considerZeroAsDefault → SURVIVED 2. lambda$considerZeroAsDefault$8 : negated conditional → NO_COVERAGE 3. lambda$considerZeroAsDefault$8 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$considerZeroAsDefault$8 → SURVIVED 4. lambda$considerZeroAsDefault$8 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$considerZeroAsDefault$8 → NO_COVERAGE 5. considerZeroAsDefault : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::considerZeroAsDefault → KILLED 6. lambda$considerZeroAsDefault$8 : negated conditional → KILLED |
return () -> (Long) value == 0 ? null : value; |
| 1431 | } | |
| 1432 |
1
1. considerZeroAsDefault : negated conditional → SURVIVED |
if (value instanceof Integer) { |
| 1433 |
6
1. considerZeroAsDefault : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::considerZeroAsDefault → SURVIVED 2. lambda$considerZeroAsDefault$9 : negated conditional → NO_COVERAGE 3. lambda$considerZeroAsDefault$9 : negated conditional → SURVIVED 4. lambda$considerZeroAsDefault$9 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$considerZeroAsDefault$9 → NO_COVERAGE 5. lambda$considerZeroAsDefault$9 : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::lambda$considerZeroAsDefault$9 → SURVIVED 6. considerZeroAsDefault : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::considerZeroAsDefault → KILLED |
return () -> (Integer) value == 0 ? null : value; |
| 1434 | } | |
| 1435 |
1
1. considerZeroAsDefault : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::considerZeroAsDefault → NO_COVERAGE |
return getter; |
| 1436 | } | |
| 1437 | | |
| 1438 | @SafeVarargs | |
| 1439 | private static <T> void merge(Consumer<T> setter, Supplier<T>... getters) { | |
| 1440 | T value = null; | |
| 1441 | for (Supplier<T> getter : getters) { | |
| 1442 | value = getter.get(); | |
| 1443 |
5
1. merge : negated conditional → KILLED 2. merge : negated conditional → KILLED 3. merge : negated conditional → KILLED 4. merge : negated conditional → KILLED 5. merge : negated conditional → KILLED |
if (value != null) { |
| 1444 | break; | |
| 1445 | } | |
| 1446 | } | |
| 1447 | // if there is a value, set it | |
| 1448 |
5
1. merge : negated conditional → KILLED 2. merge : negated conditional → KILLED 3. merge : negated conditional → KILLED 4. merge : negated conditional → KILLED 5. merge : negated conditional → KILLED |
if (value != null) { |
| 1449 |
5
1. merge : removed call to java/util/function/Consumer::accept → KILLED 2. merge : removed call to java/util/function/Consumer::accept → KILLED 3. merge : removed call to java/util/function/Consumer::accept → KILLED 4. merge : removed call to java/util/function/Consumer::accept → KILLED 5. merge : removed call to java/util/function/Consumer::accept → KILLED |
setter.accept(value); |
| 1450 | } | |
| 1451 | } | |
| 1452 | ||
| 1453 | private void configureLogs(SmppSessionConfiguration session) { | |
| 1454 |
5
1. configureLogs : negated conditional → KILLED 2. configureLogs : negated conditional → KILLED 3. configureLogs : negated conditional → KILLED 4. configureLogs : negated conditional → KILLED 5. configureLogs : negated conditional → KILLED |
if (loggingBuilder == null) { |
| 1455 | return; | |
| 1456 | } | |
| 1457 | LoggingOptions options = loggingBuilder.build(); | |
| 1458 |
1
1. configureLogs : negated conditional → NO_COVERAGE |
if (options != null) { |
| 1459 |
1
1. configureLogs : removed call to com/cloudhopper/smpp/SmppSessionConfiguration::setLoggingOptions → NO_COVERAGE |
session.setLoggingOptions(options); |
| 1460 | } | |
| 1461 | } | |
| 1462 | ||
| 1463 | private void configureSsl(SmppSessionConfiguration session) { | |
| 1464 |
5
1. configureSsl : negated conditional → KILLED 2. configureSsl : negated conditional → KILLED 3. configureSsl : negated conditional → KILLED 4. configureSsl : negated conditional → KILLED 5. configureSsl : negated conditional → KILLED |
if (sslBuilder == null) { |
| 1465 | return; | |
| 1466 | } | |
| 1467 | SslConfiguration sslConfiguration = sslBuilder.build(); | |
| 1468 |
2
1. configureSsl : negated conditional → NO_COVERAGE 2. configureSsl : removed call to com/cloudhopper/smpp/SmppSessionConfiguration::setUseSsl → NO_COVERAGE |
session.setUseSsl(sslConfiguration != null); |
| 1469 |
1
1. configureSsl : negated conditional → NO_COVERAGE |
if (sslConfiguration != null) { |
| 1470 |
1
1. configureSsl : removed call to com/cloudhopper/smpp/SmppSessionConfiguration::setSslConfiguration → NO_COVERAGE |
session.setSslConfiguration(sslConfiguration); |
| 1471 | } | |
| 1472 | } | |
| 1473 | ||
| 1474 | ||
| 1475 | private Byte getInterfaceVersion() { | |
| 1476 | InterfaceVersion version = interfaceVersionValueBuilder.getValue(DEFAULT_INTERFACE_VERSION); | |
| 1477 |
5
1. getInterfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::getInterfaceVersion → KILLED 2. getInterfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::getInterfaceVersion → KILLED 3. getInterfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::getInterfaceVersion → KILLED 4. getInterfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::getInterfaceVersion → KILLED 5. getInterfaceVersion : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/CloudhopperBuilder::getInterfaceVersion → KILLED |
return version.value(); |
| 1478 | } | |
| 1479 | ||
| 1480 | } | |
Mutations | ||
| 244 |
1.1 |
|
| 245 |
1.1 |
|
| 288 |
1.1 2.2 3.3 4.4 5.5 |
|
| 332 |
1.1 |
|
| 333 |
1.1 |
|
| 379 |
1.1 2.2 3.3 4.4 5.5 |
|
| 422 |
1.1 |
|
| 423 |
1.1 |
|
| 468 |
1.1 2.2 3.3 4.4 5.5 |
|
| 506 |
1.1 2.2 3.3 |
|
| 507 |
1.1 2.2 3.3 |
|
| 547 |
1.1 2.2 3.3 4.4 5.5 |
|
| 585 |
1.1 2.2 3.3 |
|
| 586 |
1.1 2.2 3.3 |
|
| 626 |
1.1 2.2 3.3 4.4 5.5 |
|
| 667 |
1.1 |
|
| 668 |
1.1 |
|
| 708 |
1.1 |
|
| 709 |
1.1 |
|
| 752 |
1.1 2.2 3.3 4.4 5.5 |
|
| 790 |
1.1 |
|
| 791 |
1.1 |
|
| 831 |
1.1 2.2 3.3 4.4 5.5 |
|
| 889 |
1.1 2.2 3.3 4.4 5.5 |
|
| 891 |
1.1 2.2 3.3 4.4 5.5 |
|
| 893 |
1.1 2.2 3.3 4.4 5.5 |
|
| 968 |
1.1 2.2 3.3 4.4 5.5 |
|
| 971 |
1.1 2.2 3.3 4.4 5.5 |
|
| 981 |
1.1 2.2 3.3 4.4 5.5 |
|
| 984 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1000 |
1.1 2.2 |
|
| 1029 |
1.1 |
|
| 1042 |
1.1 |
|
| 1045 |
1.1 |
|
| 1058 |
1.1 |
|
| 1061 |
1.1 |
|
| 1075 |
1.1 2.2 |
|
| 1090 |
1.1 |
|
| 1124 |
1.1 |
|
| 1185 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1188 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1250 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1253 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1260 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 |
|
| 1266 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1270 |
1.1 2.2 |
|
| 1271 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1274 |
1.1 2.2 |
|
| 1275 |
1.1 2.2 |
|
| 1279 |
1.1 2.2 3.3 4.4 |
|
| 1280 |
1.1 2.2 |
|
| 1282 |
1.1 2.2 3.3 4.4 |
|
| 1283 |
1.1 2.2 |
|
| 1285 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1289 |
1.1 2.2 |
|
| 1293 |
1.1 2.2 |
|
| 1298 |
1.1 2.2 |
|
| 1302 |
1.1 2.2 |
|
| 1306 |
1.1 2.2 |
|
| 1310 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1314 |
1.1 2.2 3.3 |
|
| 1315 |
1.1 2.2 3.3 |
|
| 1317 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1321 |
1.1 2.2 3.3 |
|
| 1325 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1326 |
1.1 |
|
| 1328 |
1.1 2.2 3.3 |
|
| 1330 |
1.1 2.2 3.3 |
|
| 1331 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1333 |
1.1 2.2 3.3 |
|
| 1334 |
1.1 2.2 3.3 |
|
| 1337 |
1.1 2.2 |
|
| 1341 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1345 |
1.1 2.2 3.3 |
|
| 1349 |
1.1 2.2 |
|
| 1350 |
1.1 2.2 |
|
| 1352 |
1.1 2.2 |
|
| 1356 |
1.1 2.2 |
|
| 1357 |
1.1 2.2 |
|
| 1359 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1363 |
1.1 2.2 3.3 4.4 |
|
| 1364 |
1.1 2.2 |
|
| 1367 |
1.1 2.2 3.3 4.4 |
|
| 1368 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1370 |
1.1 2.2 |
|
| 1374 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1375 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1377 |
1.1 2.2 |
|
| 1381 |
1.1 2.2 3.3 |
|
| 1382 |
1.1 2.2 3.3 |
|
| 1384 |
1.1 |
|
| 1388 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1393 |
1.1 2.2 |
|
| 1398 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1400 |
1.1 2.2 |
|
| 1401 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1402 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1403 |
1.1 |
|
| 1404 |
1.1 |
|
| 1405 |
1.1 |
|
| 1406 |
1.1 2.2 |
|
| 1407 |
1.1 |
|
| 1408 |
1.1 |
|
| 1409 |
1.1 |
|
| 1410 |
1.1 |
|
| 1411 |
1.1 |
|
| 1412 |
1.1 |
|
| 1413 |
1.1 |
|
| 1414 |
1.1 |
|
| 1415 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
| 1416 |
1.1 2.2 3.3 |
|
| 1417 |
1.1 2.2 |
|
| 1418 |
1.1 2.2 |
|
| 1419 |
1.1 2.2 |
|
| 1420 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 |
|
| 1422 |
1.1 |
|
| 1423 |
1.1 |
|
| 1424 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1429 |
1.1 2.2 |
|
| 1430 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
| 1432 |
1.1 |
|
| 1433 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
| 1435 |
1.1 |
|
| 1443 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1448 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1449 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1454 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1458 |
1.1 |
|
| 1459 |
1.1 |
|
| 1464 |
1.1 2.2 3.3 4.4 5.5 |
|
| 1468 |
1.1 2.2 |
|
| 1469 |
1.1 |
|
| 1470 |
1.1 |
|
| 1477 |
1.1 2.2 3.3 4.4 5.5 |