java.lang.Object
org.mule.sdk.api.connectivity.ConnectionValidationResult
Represents the result of a Connection Validation.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionValidationResultstatic ConnectionValidationResultOptional<org.mule.runtime.api.message.ErrorType>booleanisValid()static ConnectionValidationResultsuccess()
-
Method Details
-
success
- Returns:
- a
ConnectionValidationResultwith a valid status.
-
failure
- Parameters:
message- Message in case of a invalid connectionexception- The exception that causes the connection invalidity- Returns:
- a
ConnectionValidationResultwith a invalid status.
-
failure
public static ConnectionValidationResult failure(String message, org.mule.runtime.api.message.ErrorType errorType, Exception exception) - Parameters:
message- Message in case of a invalid connectionerrorType- AnErrorTypethat represents the cause of the invalid connectionexception- The exception that causes the connection invalidity- Returns:
- a
ConnectionValidationResultwith a invalid status.
-
isValid
public boolean isValid()- Returns:
- A
booleanindicating if the connection is valid or not.
-
getMessage
- Returns:
- A
Stringindicating the Validation message. The message should not be null in case of a invalid connection.
-
getErrorType
- Returns:
- A
ErrorTypeindicating the type of the occurred problem.
-
getException
- Returns:
- The
Exceptionthat causes the connection invalidity. The exception should not be null in case of a invalid connection.
-