Class NetworkException

All Implemented Interfaces:
Serializable

public class NetworkException extends TnsAIException
Exception for network-related errors (connection failures, DNS issues, etc.). Always retryable with exponential backoff recommended.
See Also:
  • Constructor Details

  • Method Details

    • getHost

      public String getHost()
    • getPort

      public Integer getPort()
    • getSuggestedRetryDelayMs

      public long getSuggestedRetryDelayMs()
      Description copied from class: TnsAIException
      Gets suggested retry delay in milliseconds. Override in subclasses for specific retry strategies.
      Overrides:
      getSuggestedRetryDelayMs in class TnsAIException
    • getMaxRetryAttempts

      public int getMaxRetryAttempts()
      Description copied from class: TnsAIException
      Gets maximum recommended retry attempts.
      Overrides:
      getMaxRetryAttempts in class TnsAIException
    • connectionRefused

      public static NetworkException connectionRefused(String host, int port)
      Factory method for connection refused errors.
    • dnsResolutionFailed

      public static NetworkException dnsResolutionFailed(String host, Throwable cause)
      Factory method for DNS resolution failures.
    • connectionTimeout

      public static NetworkException connectionTimeout(String host, int port, long timeoutMs)
      Factory method for connection timeout.