Package com.lucimber.dbus.connection
Class ConnectionConfig
java.lang.Object
com.lucimber.dbus.connection.ConnectionConfig
Configuration class for D-Bus connections containing timeout and other connection settings. This
class uses a builder pattern to allow for flexible configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder class for creating ConnectionConfig instances. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionConfig.Builder
builder()
Creates a new builder with default timeout values.static ConnectionConfig
Creates a default configuration with all default timeout values.boolean
Gets the timeout for connection close operations.Gets the timeout for establishing connections.long
Gets the connection timeout in milliseconds for compatibility with existing code.Gets the interval between health checks.Gets the timeout for individual health checks.int
Gets the maximum number of reconnection attempts.Gets the timeout for method call responses.long
Gets the method call timeout in milliseconds for compatibility with existing code.Gets the timeout for read operations.long
Gets the read timeout in milliseconds for compatibility with existing code.double
Gets the backoff multiplier for reconnection delays.Gets the initial delay before the first reconnection attempt.Gets the maximum delay between reconnection attempts.Gets the timeout for write operations.long
Gets the write timeout in milliseconds for compatibility with existing code.int
hashCode()
boolean
Gets whether automatic reconnection is enabled.boolean
Gets whether health check monitoring is enabled.toString()
-
Method Details
-
builder
Creates a new builder with default timeout values.- Returns:
- A new builder instance
-
defaultConfig
Creates a default configuration with all default timeout values.- Returns:
- A default configuration instance
-
getMethodCallTimeout
Gets the timeout for method call responses.- Returns:
- The method call timeout duration
-
getConnectTimeout
Gets the timeout for establishing connections.- Returns:
- The connection timeout duration
-
getReadTimeout
Gets the timeout for read operations.- Returns:
- The read timeout 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
Gets the interval between health checks.- Returns:
- The health check interval 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
Gets the initial delay before the first reconnection attempt.- Returns:
- The initial reconnection delay 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
Gets the timeout for connection close operations.- Returns:
- The close timeout duration
-
equals
-
hashCode
public int hashCode() -
toString
-