Class ConnectionConfig

java.lang.Object
com.lucimber.dbus.connection.ConnectionConfig

public final class ConnectionConfig extends Object
Configuration class for D-Bus connections containing timeout and other connection settings. This class uses a builder pattern to allow for flexible configuration.
  • Method Details

    • builder

      public static ConnectionConfig.Builder builder()
      Creates a new builder with default timeout values.
      Returns:
      A new builder instance
    • defaultConfig

      public static ConnectionConfig defaultConfig()
      Creates a default configuration with all default timeout values.
      Returns:
      A default configuration instance
    • getMethodCallTimeout

      public Duration getMethodCallTimeout()
      Gets the timeout for method call responses.
      Returns:
      The method call timeout duration
    • getConnectTimeout

      public Duration getConnectTimeout()
      Gets the timeout for establishing connections.
      Returns:
      The connection timeout duration
    • getReadTimeout

      public Duration getReadTimeout()
      Gets the timeout for read operations.
      Returns:
      The read timeout duration
    • getWriteTimeout

      public Duration getWriteTimeout()
      Gets the timeout for write operations.
      Returns:
      The write timeout duration
    • getMethodCallTimeoutMs

      public long getMethodCallTimeoutMs()
      Gets the method call timeout in milliseconds for compatibility with existing code.
      Returns:
      The method call timeout in milliseconds
    • getConnectTimeoutMs

      public long getConnectTimeoutMs()
      Gets the connection timeout in milliseconds for compatibility with existing code.
      Returns:
      The connection timeout in milliseconds
    • getReadTimeoutMs

      public long getReadTimeoutMs()
      Gets the read timeout in milliseconds for compatibility with existing code.
      Returns:
      The read timeout in milliseconds
    • getWriteTimeoutMs

      public long getWriteTimeoutMs()
      Gets the write timeout in milliseconds for compatibility with existing code.
      Returns:
      The write timeout in milliseconds
    • isHealthCheckEnabled

      public boolean isHealthCheckEnabled()
      Gets whether health check monitoring is enabled.
      Returns:
      true if health checks are enabled
    • getHealthCheckInterval

      public Duration getHealthCheckInterval()
      Gets the interval between health checks.
      Returns:
      The health check interval duration
    • getHealthCheckTimeout

      public Duration getHealthCheckTimeout()
      Gets the timeout for individual health checks.
      Returns:
      The health check timeout duration
    • isAutoReconnectEnabled

      public boolean isAutoReconnectEnabled()
      Gets whether automatic reconnection is enabled.
      Returns:
      true if auto-reconnect is enabled
    • getReconnectInitialDelay

      public Duration getReconnectInitialDelay()
      Gets the initial delay before the first reconnection attempt.
      Returns:
      The initial reconnection delay duration
    • getReconnectMaxDelay

      public Duration getReconnectMaxDelay()
      Gets the maximum delay between reconnection attempts.
      Returns:
      The maximum reconnection delay duration
    • getReconnectBackoffMultiplier

      public double getReconnectBackoffMultiplier()
      Gets the backoff multiplier for reconnection delays.
      Returns:
      The backoff multiplier
    • getMaxReconnectAttempts

      public int getMaxReconnectAttempts()
      Gets the maximum number of reconnection attempts.
      Returns:
      The maximum reconnection attempts
    • getCloseTimeout

      public Duration getCloseTimeout()
      Gets the timeout for connection close operations.
      Returns:
      The close timeout duration
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object