public final class LifecycleAwareConfigurationInstance extends AbstractInterceptable implements org.mule.runtime.extension.api.runtime.config.ConfigurationInstance
ConfigurationInstance which propagates dependency injection and lifecycle phases into the contained
configuration value and connectionProvider (if present).
It also implements the Interceptable interface which means that it contains a list of interceptors,
on which IoC and lifecycle is propagated as well.
In the case of the connectionProvider being present, then it also binds the value to the
ConnectionProvider by the means of ConnectionManager.bind(Object, ConnectionProvider) when the
initialise() phase is executed. That bound will be broken on the stop() phase by using
ConnectionManager.unbind(Object)
muleContext| Constructor and Description |
|---|
LifecycleAwareConfigurationInstance(String name,
org.mule.runtime.api.meta.model.config.ConfigurationModel model,
Object value,
org.mule.runtime.extension.api.runtime.config.ConfigurationState configurationState,
List<org.mule.runtime.extension.api.runtime.operation.Interceptor> interceptors,
Optional<org.mule.runtime.api.connection.ConnectionProvider> connectionProvider)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Propagates this lifecycle phase into the the
value and each item in AbstractInterceptable.getInterceptors() |
Optional<org.mule.runtime.api.connection.ConnectionProvider> |
getConnectionProvider() |
org.mule.runtime.api.meta.model.config.ConfigurationModel |
getModel() |
String |
getName() |
org.mule.runtime.extension.api.runtime.config.ConfigurationState |
getState() |
org.mule.runtime.extension.api.runtime.config.ConfigurationStats |
getStatistics() |
Object |
getValue() |
void |
initialise()
Initialises this instance by
Initialising the
configurationStats
Performs dependency injection on the value and each item in AbstractInterceptable.getInterceptors()
Propagates this lifecycle phase into the the value and each item in AbstractInterceptable.getInterceptors()
|
void |
start()
Propagates this lifecycle phase into the the
value and each item in AbstractInterceptable.getInterceptors() |
void |
stop()
Propagates this lifecycle phase into the the
value and each item in AbstractInterceptable.getInterceptors(). |
getInterceptorspublic LifecycleAwareConfigurationInstance(String name, org.mule.runtime.api.meta.model.config.ConfigurationModel model, Object value, org.mule.runtime.extension.api.runtime.config.ConfigurationState configurationState, List<org.mule.runtime.extension.api.runtime.operation.Interceptor> interceptors, Optional<org.mule.runtime.api.connection.ConnectionProvider> connectionProvider)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
configurationStatsvalue and each item in AbstractInterceptable.getInterceptors()value and each item in AbstractInterceptable.getInterceptors()initialise in interface org.mule.runtime.api.lifecycle.Initialisableinitialise in class AbstractInterceptableorg.mule.runtime.api.lifecycle.InitialisationException - if an exception is foundpublic void start()
throws org.mule.runtime.api.exception.MuleException
value and each item in AbstractInterceptable.getInterceptors()start in interface org.mule.runtime.api.lifecycle.Startablestart in class AbstractInterceptableorg.mule.runtime.api.exception.MuleException - if an exception is foundpublic void stop()
throws org.mule.runtime.api.exception.MuleException
value and each item in AbstractInterceptable.getInterceptors(). Also triggers a
ConfigurationInstanceNotification that is being stopped.stop in interface org.mule.runtime.api.lifecycle.Stoppablestop in class AbstractInterceptableorg.mule.runtime.api.exception.MuleException - if an exception is foundpublic void dispose()
value and each item in AbstractInterceptable.getInterceptors()dispose in interface org.mule.runtime.api.lifecycle.Disposabledispose in class AbstractInterceptablepublic String getName()
getName in interface org.mule.runtime.extension.api.runtime.config.ConfigurationInstancepublic Optional<org.mule.runtime.api.connection.ConnectionProvider> getConnectionProvider()
getConnectionProvider in interface org.mule.runtime.extension.api.runtime.config.ConfigurationInstancepublic org.mule.runtime.api.meta.model.config.ConfigurationModel getModel()
getModel in interface org.mule.runtime.extension.api.runtime.config.ConfigurationInstancepublic Object getValue()
getValue in interface org.mule.runtime.extension.api.runtime.config.ConfigurationInstancepublic org.mule.runtime.extension.api.runtime.config.ConfigurationStats getStatistics()
getStatistics in interface org.mule.runtime.extension.api.runtime.config.ConfigurationInstanceIllegalStateException - if invoked before initialise()public org.mule.runtime.extension.api.runtime.config.ConfigurationState getState()
getState in interface org.mule.runtime.extension.api.runtime.config.ConfigurationInstanceCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.