Class ConnectionTestResult

  • All Implemented Interfaces:
    Serializable

    public final class ConnectionTestResult
    extends Object
    implements Serializable
    Represents the result of a TLS connection test, including the trust validation status and the certificate chain used during the test.

    This class is immutable and uses Lombok's @Value annotation to generate boilerplate code such as getters, equals, hashCode, and toString methods.

    Since:
    8.5.0
    Author:
    tobias
    See Also:
    Serialized Form
    • Constructor Detail

      • ConnectionTestResult

        public ConnectionTestResult​(boolean serviceAvailable,
                                    Exception exception,
                                    TrustValidationResult clientTrustValidationResult,
                                    TrustValidationResult serverTrustValidationResult)
        Creates a new ConnectionTestResult instance.
        Parameters:
        serviceAvailable - Indicates whether the service is available at all.
        exception - The exception that occurred during the connection test, if any.
        clientTrustValidationResult - The result of the client trust validation, including captured certificates and any exceptions.
        serverTrustValidationResult - The result of the server trust validation, including captured certificates and any exceptions.
    • Method Detail

      • isSuccessful

        public boolean isSuccessful()
        Indicates whether the connection test was successful. A successful test means that the connection could be established and all trust validations passed without exceptions.
        Returns:
        true if the connection test was successful, false otherwise.
      • isServiceAvailable

        public boolean isServiceAvailable()
        Indicates whether the service is available at all.
      • getException

        public Exception getException()
        The exception that occurred during the connection test, if any.
      • getClientTrustValidationResult

        public TrustValidationResult getClientTrustValidationResult()
        The result of the client trust validation, including captured certificates and any exceptions.
      • getServerTrustValidationResult

        public TrustValidationResult getServerTrustValidationResult()
        The result of the server trust validation, including captured certificates and any exceptions.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object