Class IotConfig.Builder

Enclosing class:
IotConfig

public static class IotConfig.Builder extends AbstractServiceConfigBuilder<IotConfig.Builder,IotConfig>
Builder for IotConfig.
  • Method Details

    • mqttEnabled

      public IotConfig.Builder mqttEnabled(boolean mqttEnabled)
      Enables or disables the embedded MQTT broker.
      Parameters:
      mqttEnabled - true to enable (default true)
      Returns:
      this builder
    • mqttAutoStart

      public IotConfig.Builder mqttAutoStart(boolean mqttAutoStart)
      Sets whether the embedded MQTT broker starts automatically on container startup rather than lazily on the first MQTT connection.
      Parameters:
      mqttAutoStart - true to auto-start (default false)
      Returns:
      this builder
    • mqttHost

      public IotConfig.Builder mqttHost(String mqttHost)
      Sets the bind address for the embedded MQTT broker.
      Parameters:
      mqttHost - the host (default "0.0.0.0")
      Returns:
      this builder
    • mqttPort

      public IotConfig.Builder mqttPort(int mqttPort)
      Sets the port used by the embedded MQTT broker.
      Parameters:
      mqttPort - the port (default 1883)
      Returns:
      this builder
    • build

      public IotConfig build()
      Creates an immutable IotConfig from this builder.
      Specified by:
      build in class AbstractServiceConfigBuilder<IotConfig.Builder,IotConfig>
      Returns:
      the IoT Core configuration