Class ConnectionTestResult
- java.lang.Object
-
- de.xima.fc.certificate.provider.tls.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
@Valueannotation to generate boilerplate code such as getters, equals, hashCode, and toString methods.- Since:
- 8.5.0
- Author:
- tobias
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConnectionTestResult(boolean serviceAvailable, Exception exception, TrustValidationResult clientTrustValidationResult, TrustValidationResult serverTrustValidationResult)Creates a newConnectionTestResultinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)TrustValidationResultgetClientTrustValidationResult()The result of the client trust validation, including captured certificates and any exceptions.ExceptiongetException()The exception that occurred during the connection test, if any.TrustValidationResultgetServerTrustValidationResult()The result of the server trust validation, including captured certificates and any exceptions.inthashCode()booleanisServiceAvailable()Indicates whether the service is available at all.booleanisSuccessful()Indicates whether the connection test was successful.StringtoString()
-
-
-
Constructor Detail
-
ConnectionTestResult
public ConnectionTestResult(boolean serviceAvailable, Exception exception, TrustValidationResult clientTrustValidationResult, TrustValidationResult serverTrustValidationResult)Creates a newConnectionTestResultinstance.- 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:
trueif the connection test was successful,falseotherwise.
-
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.
-
-