Class IotConfig.Builder
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfigBuilder<IotConfig.Builder,IotConfig>
io.floci.testcontainers.config.services.IotConfig.Builder
- Enclosing class:
- IotConfig
public static class IotConfig.Builder
extends AbstractServiceConfigBuilder<IotConfig.Builder,IotConfig>
Builder for
IotConfig.-
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutableIotConfigfrom this builder.mqttAutoStart(boolean mqttAutoStart) Sets whether the embedded MQTT broker starts automatically on container startup rather than lazily on the first MQTT connection.mqttEnabled(boolean mqttEnabled) Enables or disables the embedded MQTT broker.Sets the bind address for the embedded MQTT broker.mqttPort(int mqttPort) Sets the port used by the embedded MQTT broker.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled
-
Method Details
-
mqttEnabled
Enables or disables the embedded MQTT broker.- Parameters:
mqttEnabled-trueto enable (default true)- Returns:
- this builder
-
mqttAutoStart
Sets whether the embedded MQTT broker starts automatically on container startup rather than lazily on the first MQTT connection.- Parameters:
mqttAutoStart-trueto auto-start (default false)- Returns:
- this builder
-
mqttHost
Sets the bind address for the embedded MQTT broker.- Parameters:
mqttHost- the host (default "0.0.0.0")- Returns:
- this builder
-
mqttPort
Sets the port used by the embedded MQTT broker.- Parameters:
mqttPort- the port (default 1883)- Returns:
- this builder
-
build
Creates an immutableIotConfigfrom this builder.- Specified by:
buildin classAbstractServiceConfigBuilder<IotConfig.Builder,IotConfig> - Returns:
- the IoT Core configuration
-