Package org.mockserver.async.security
Class MqttSecurity
java.lang.Object
org.mockserver.async.security.MqttSecurity
Immutable carrier for MQTT security configuration (username/password and/or SSL).
All fields are optional; when all are null or blank,
isEmpty()
returns true and no security is applied to the MQTT connection.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MqttSecurity.Builderbuilder()static MqttSecurityempty()Returns a new empty (no-op) security instance.Returns the SSL properties to pass through to Paho'sMqttConnectOptions.setSSLProperties().booleanisEmpty()Returnstruewhen no security fields are set.
-
Method Details
-
getUsername
-
getPassword
-
getSslProperties
Returns the SSL properties to pass through to Paho'sMqttConnectOptions.setSSLProperties(). Keys are typicallycom.ibm.ssl.keyStore,com.ibm.ssl.trustStore, etc.- Returns:
- an unmodifiable (possibly empty) map of SSL properties
-
isEmpty
public boolean isEmpty()Returnstruewhen no security fields are set. -
empty
Returns a new empty (no-op) security instance. -
builder
-