Class ConnectionException

All Implemented Interfaces:
Serializable

public final class ConnectionException extends LoomException
Thrown when a connection cannot be established or maintained.

This exception indicates a network-level problem communicating with a remote peer. Common causes include: - Network unreachable - Connection refused - Connection reset or closed - DNS resolution failures - SSL/TLS handshake failures

Clients may choose to retry the operation, use an alternative peer, or implement exponential backoff and circuit breaker patterns.

Since:
1.0
See Also:
  • Constructor Details

    • ConnectionException

      public ConnectionException(String message, Throwable cause)
      Creates a new ConnectionException with message and cause.
      Parameters:
      message - the error message
      cause - the underlying cause
    • ConnectionException

      public ConnectionException(String message)
      Creates a new ConnectionException with message.
      Parameters:
      message - the error message
    • ConnectionException

      public ConnectionException(String message, @Nullable String remoteAddress, @Nullable String remotePort, ConnectionException.ConnectionError errorType, @Nullable Throwable cause)
      Creates a new ConnectionException with detailed information.
      Parameters:
      message - the error message
      remoteAddress - the address of the remote peer
      remotePort - the port of the remote peer
      errorType - the type of connection error
      cause - the underlying cause
  • Method Details

    • getRemoteEndpoint

      public @Nullable String getRemoteEndpoint()
      Gets the full remote endpoint address.
      Returns:
      address:port if both are available, or null if not specified