public class SslBuilder extends AbstractParent<CloudhopperBuilder> implements Builder<com.cloudhopper.smpp.ssl.SslConfiguration>
parent
Constructor and Description |
---|
SslBuilder(CloudhopperBuilder parent,
BuildContext buildContext)
Initializes the builder with a parent builder.
|
Modifier and Type | Method and Description |
---|---|
com.cloudhopper.smpp.ssl.SslConfiguration |
build()
Instantiate and configures the instance.
|
ConfigurationValueBuilder<SslBuilder,Boolean> |
enable()
Enable or disable SSL.
|
SslBuilder |
enable(Boolean enale)
Enable or disable SSL.
|
SslBuilder |
sslConfiguration(com.cloudhopper.smpp.ssl.SslConfiguration sslConfiguration)
Configure SSL handling.
|
and
public SslBuilder(CloudhopperBuilder parent, BuildContext buildContext)
AbstractParent.and()
method. The EnvironmentBuilder
is
used to evaluate properties when build()
method is called.parent
- the parent builderbuildContext
- for registering instances and property evaluationpublic SslBuilder enable(Boolean enale)
The value set using this method takes precedence over any property and
default value configured using enable()
.
.enable(true) .enable() .properties("${custom.property.high-priority}", "${custom.property.low-priority}") .defaultValue(false)
.enable(true) .enable() .properties("${custom.property.high-priority}", "${custom.property.low-priority}") .defaultValue(false)In both cases,
enable(true)
is used.
If this method is called several times, only the last value is used.
If null
value is set, it is like not setting a value at all. The
property/default value configuration is applied.
enale
- true to enable SSL, false to disablepublic ConfigurationValueBuilder<SslBuilder,Boolean> enable()
This method is mainly used by Configurer
s to register some
property keys and/or a default value. The aim is to let developer be able
to externalize its configuration (using system properties, configuration
file or anything else). If the developer doesn't configure any value for
the registered properties, the default value is used (if set).
.enable() .properties("${custom.property.high-priority}", "${custom.property.low-priority}") .defaultValue(false)
Non-null value set using enable(Boolean)
takes precedence over
property values and default value.
.enable(true) .enable() .properties("${custom.property.high-priority}", "${custom.property.low-priority}") .defaultValue(false)The value
true
is used regardless of the value of the properties
and default value.
See ConfigurationValueBuilder
for more information.
public SslBuilder sslConfiguration(com.cloudhopper.smpp.ssl.SslConfiguration sslConfiguration)
sslConfiguration
- the new SSL configurationCopyright © 2021. All rights reserved.