Class DittoHttpListenConfig.Builder

java.lang.Object
com.ditto.java.transports.DittoHttpListenConfig.Builder
Enclosing class:
DittoHttpListenConfig

public static final class DittoHttpListenConfig.Builder extends Object
Builder for constructing a DittoHttpListenConfig.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Returns whether HTTP listening is currently enabled.
      Returns:
      true if enabled, false otherwise.
    • isEnabled

      public @NonNull DittoHttpListenConfig.Builder isEnabled(boolean enabled)
      Sets whether HTTP listening should be enabled.
      Parameters:
      enabled - true to enable, false to disable.
      Returns:
      this Builder for method chaining.
    • port

      public int port()
      Returns the current port number.
      Returns:
      the port number.
    • port

      public @NonNull DittoHttpListenConfig.Builder port(int port)
      Sets the HTTP port number to listen on.
      Parameters:
      port - the port number (1-65535).
      Returns:
      this Builder for method chaining.
    • isWebsocketSync

      public boolean isWebsocketSync()
      Returns whether WebSocket sync is currently enabled.
      Returns:
      true if WebSocket sync is enabled, false otherwise.
    • isWebsocketSync

      public @NonNull DittoHttpListenConfig.Builder isWebsocketSync(boolean websocketSync)
      Sets whether WebSocket sync should be enabled.
      Parameters:
      websocketSync - true to enable WebSocket sync, false to disable.
      Returns:
      this Builder for method chaining.
    • tlsKeyPath

      public @Nullable String tlsKeyPath()
      Returns the current TLS key path.
      Returns:
      the TLS key file path, or null if not set.
    • tlsKeyPath

      public @NonNull DittoHttpListenConfig.Builder tlsKeyPath(@Nullable String tlsKeyPath)
      Sets the path to the TLS private key file for secure connections.
      Parameters:
      tlsKeyPath - the path to the TLS key file, or null to disable TLS.
      Returns:
      this Builder for method chaining.
    • tlsCertificatePath

      public @Nullable String tlsCertificatePath()
      Returns the current TLS certificate path.
      Returns:
      the TLS certificate file path, or null if not set.
    • tlsCertificatePath

      public @NonNull DittoHttpListenConfig.Builder tlsCertificatePath(@Nullable String tlsCertificatePath)
      Sets the path to the TLS certificate file for secure connections.
      Parameters:
      tlsCertificatePath - the path to the TLS certificate file, or null to disable TLS.
      Returns:
      this Builder for method chaining.