public static final class DtlsClusterConnectorConfig.Builder extends Object
| Constructor and Description |
|---|
DtlsClusterConnectorConfig.Builder()
Create new builder.
|
DtlsClusterConnectorConfig.Builder(DtlsClusterConnectorConfig initialConfiguration)
Create new builder initialized with provided configuration.
|
| Modifier and Type | Method and Description |
|---|---|
DtlsClusterConnectorConfig |
build()
Creates an instance of
DtlsClusterConnectorConfig based
on the properties set on this builder. |
DtlsClusterConnectorConfig |
getIncompleteConfig()
Returns a potentially incomplete configuration.
|
DtlsClusterConnectorConfig.Builder |
setAddress(InetSocketAddress address)
Sets local socket address for internal cluster connector.
|
DtlsClusterConnectorConfig.Builder |
setBackwardMessage(Boolean enable)
Enable to send outgoing messages back via original receiving
connector (router).
|
DtlsClusterConnectorConfig.Builder |
setClusterMac(Boolean enable)
Enable to send forwarded and backwarded messages protected with a
MAC.
|
DtlsClusterConnectorConfig.Builder |
setSecure(String identity,
SecretKey secret)
Set PSK credentials.
|
public DtlsClusterConnectorConfig.Builder()
public DtlsClusterConnectorConfig.Builder(DtlsClusterConnectorConfig initialConfiguration)
initialConfiguration - configuration for initializationpublic DtlsClusterConnectorConfig.Builder setAddress(InetSocketAddress address)
address - local socket address for internal cluster connector.public DtlsClusterConnectorConfig.Builder setSecure(String identity, SecretKey secret)
identity - PSK identity for cluster internal connector. If
null, encryption is disabled. In that case the
secret must also be null.secret - PSK secret for cluster internal connector. The secret
is copied, therefore the caller is intended to delete it
afterwards. If null, encryption is disabled. In
that case the identity must also be null.IllegalArgumentException - if one argument is null and
the other not.public DtlsClusterConnectorConfig.Builder setClusterMac(Boolean enable)
setSecure(String, SecretKey) enables
the MAC as default. Without encryption, using a MAC for forwarded and
backwarded messages is not possible.enable - true, to use MAC, false, otherwise.public DtlsClusterConnectorConfig.Builder setBackwardMessage(Boolean enable)
enable - true, to send outgoing messages back via
original receiving connector (router), false, to
send outgoing messages directly.public DtlsClusterConnectorConfig getIncompleteConfig()
DtlsConnectorConfig use build()
instead.public DtlsClusterConnectorConfig build()
DtlsClusterConnectorConfig based
on the properties set on this builder.
Fills in default values.
IllegalStateException - if
DtlsClusterConnectorConfig.address wasn't
provided.Copyright © 2023 Eclipse Foundation. All rights reserved.