C - the generic type of the connections that the ConnectionProviderWrapper.delegate producespublic class LifecycleAwareConnectionProviderWrapper<C> extends ConnectionProviderWrapper<C>
ConnectionProviderWrapper which performs lifecycle and dependency injection operations on the generated connections| Constructor and Description |
|---|
LifecycleAwareConnectionProviderWrapper(org.mule.runtime.api.connection.ConnectionProvider<C> delegate,
MuleContext muleContext)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
C |
connect()
Obtains a
Connection from the delegate and applies injection dependency and the muleContext's completed
Lifecycle phases |
void |
disconnect(C connection)
Disconnects the
connection and then applies all the necessary Lifecycle phases until the
Disposable.PHASE_NAME transition is reached |
Optional<org.mule.runtime.api.config.PoolingProfile> |
getPoolingProfile() |
RetryPolicyTemplate |
getRetryPolicyTemplate() |
dispose, getDelegate, initialise, start, stop, unwrapProviderWrapper, validatepublic LifecycleAwareConnectionProviderWrapper(org.mule.runtime.api.connection.ConnectionProvider<C> delegate, MuleContext muleContext)
delegate - the ConnectionProvider to be wrappedmuleContext - the owning MuleContextpublic C connect() throws org.mule.runtime.api.connection.ConnectionException
Connection from the delegate and applies injection dependency and the muleContext's completed
Lifecycle phasesconnect in interface org.mule.runtime.api.connection.ConnectionProvider<C>connect in class ConnectionProviderWrapper<C>Connection with dependencies injected and the correct lifecycle stateorg.mule.runtime.api.connection.ConnectionException - if an exception was found obtaining the connection or managing itpublic void disconnect(C connection)
connection and then applies all the necessary Lifecycle phases until the
Disposable.PHASE_NAME transition is reacheddisconnect in interface org.mule.runtime.api.connection.ConnectionProvider<C>disconnect in class ConnectionProviderWrapper<C>connection - the Connection to be destroyedpublic RetryPolicyTemplate getRetryPolicyTemplate()
getRetryPolicyTemplate in class ConnectionProviderWrapper<C>RetryPolicyTemplate from the delegated ConnectionProviderWrapper, if the ConnectionProviderWrapper.delegate is a
ConnectionProvider then a default RetryPolicy is returned from the ConnectionProviderWrapperpublic 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.