C - public final class ErrorTypeHandlerConnectionProviderWrapper<C> extends ConnectionProviderWrapper<C>
ConnectionProviderWrapper implementation which handles the exceptions occurred when this#connect() and the
failed ConnectionValidationResult from the this#validate(Object), this wrapper consumes these outputs and if a
ErrorTypeDefinition is provided transforms it and communicates the proper ErrorTypemuleContext| Constructor and Description |
|---|
ErrorTypeHandlerConnectionProviderWrapper(org.mule.runtime.api.connection.ConnectionProvider<C> connectionProvider,
MuleContext muleContext,
org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
RetryPolicyTemplate retryPolicyTemplate) |
| Modifier and Type | Method and Description |
|---|---|
C |
connect()
Delegates to the proper
ConnectionProvider, if this fails and throws a ConnectionException, this method will
introspect into the cause of this exception and if the cause is a ModuleException a new ConnectionException
will be created communicating the proper ErrorType, otherwise the original exception will be propagated. |
Optional<org.mule.runtime.api.config.PoolingProfile> |
getPoolingProfile() |
RetryPolicyTemplate |
getRetryPolicyTemplate() |
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(C connection)
Delegates the validation of the connection
C to the proper ConnectionProvider, is the validation is not valid
this method will introspect into the exception cause and look for a ModuleException, if one is found a new
ConnectionValidationResult will be created with the same information, but communicating the ErrorType. |
disconnect, dispose, getDelegate, initialise, start, stop, unwrapProviderWrapperpublic ErrorTypeHandlerConnectionProviderWrapper(org.mule.runtime.api.connection.ConnectionProvider<C> connectionProvider, MuleContext muleContext, org.mule.runtime.api.meta.model.ExtensionModel extensionModel, RetryPolicyTemplate retryPolicyTemplate)
public C connect() throws org.mule.runtime.api.connection.ConnectionException
ConnectionProvider, if this fails and throws a ConnectionException, this method will
introspect into the cause of this exception and if the cause is a ModuleException a new ConnectionException
will be created communicating the proper ErrorType, otherwise the original exception will be propagated.connect in interface org.mule.runtime.api.connection.ConnectionProvider<C>connect in class ConnectionProviderWrapper<C>Connectionorg.mule.runtime.api.connection.ConnectionException - when a problem occurs creating the connectionpublic org.mule.runtime.api.connection.ConnectionValidationResult validate(C connection)
C to the proper ConnectionProvider, is the validation is not valid
this method will introspect into the exception cause and look for a ModuleException, if one is found a new
ConnectionValidationResult will be created with the same information, but communicating the ErrorType.validate in interface org.mule.runtime.api.connection.ConnectionProvider<C>validate in class ConnectionProviderWrapper<C>connection - a non null C.ConnectionValidationResult indicating if the connection is valid or not.public RetryPolicyTemplate getRetryPolicyTemplate()
getRetryPolicyTemplate in class ConnectionProviderWrapper<C>RetryPolicyTemplatepublic Optional<org.mule.runtime.api.config.PoolingProfile> getPoolingProfile()
getPoolingProfile in interface org.mule.runtime.api.config.HasPoolingProfilegetPoolingProfile in class ConnectionProviderWrapper<C>Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.