Interface ConfigurationInstance
ConfigurationModel class provides introspection on a configuration's structure and parameters, this
concept provides an abstraction on an actual configuration instance which was declared and instantiated.
This abstraction is inspired in the traditional model that programming languages use to declare a variable. In such model, a variable has a name, a type, a value and in some higher level languages such as Java or .net they can also have metadata by the use of annotations.
In the same way, this declaration provides a getName(), a getModel() (which for the purpose of this
abstraction acts as a type), a getValue() (which is the actual configuration instance) and some metadata
(getStatistics())
It can optionally also contain a ConnectionProvider which will be used to handle connections in case the owning
extension requires connectivity. There's a strong composition and lifecycle bound between a ConnectionProvider and a
ConfigurationInstance. Whatever lifecycle phase is applied to a ConfigurationInstance, it should be propagated
to its owned ConnectionProvider. More specifically, if a ConfigurationInstance is stopped, then the
ConnectionProvider should also be stopped and all its active connections be released.
- Since:
- 1.0
-
Method Details
-
getName
String getName()- Returns:
- the name for this instance
-
getModel
org.mule.runtime.api.meta.model.config.ConfigurationModel getModel()- Returns:
- the
ConfigurationModelthis instance is based on
-
getValue
Object getValue()- Returns:
- the actual configuration instance to be used
-
getStatistics
ConfigurationStats getStatistics()- Returns:
- a
ConfigurationStatsobject with statistics about the usage of the configuration
-
getConnectionProvider
Optional<org.mule.runtime.api.connection.ConnectionProvider> getConnectionProvider()- Returns:
- An
Optionalwhich (maybe) holds theConnectionProviderto be used withthisConfigurationInstance
-
getState
ConfigurationState getState()- Returns:
- a
ConfigurationStateholding the parameter values forthisinstance.
-