Class DittoTcpListenConfig.Builder

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

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

    • isEnabled

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

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

      public @NonNull String interfaceIp()
      Returns the current interface IP address.
      Returns:
      the interface IP address string.
    • interfaceIp

      public @NonNull DittoTcpListenConfig.Builder interfaceIp(@NonNull String interfaceIp)
      Sets the network interface IP address to bind to.
      Parameters:
      interfaceIp - the IP address of the network interface to listen on.
      Returns:
      this Builder for method chaining.
    • port

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

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