Class DittoHttpListenConfig

java.lang.Object
com.ditto.java.transports.DittoHttpListenConfig

public final class DittoHttpListenConfig extends Object

Configuration for listening on an HTTP/WebSocket server to accept incoming sync connections.

This is an advanced server-like configuration for specific use cases. It supports WebSocket for Ditto sync connections. TLS can be configured for secure connections.

  • Method Details

    • isEnabled

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

      public @NonNull String getInterfaceIp()
      Returns the network interface IP address to bind to.
      Returns:
      the interface IP address string.
    • getPort

      public int getPort()
      Returns the HTTP port number to listen on.
      Returns:
      the port number.
    • isWebsocketSync

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

      public @Nullable String getTlsKeyPath()
      Returns the path to the TLS private key file.
      Returns:
      the TLS key file path, or null if TLS is not configured.
    • getTlsCertificatePath

      public @Nullable String getTlsCertificatePath()
      Returns the path to the TLS certificate file.
      Returns:
      the TLS certificate file path, or null if TLS is not configured.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object