@NoImplement public 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.
Modifier and Type | Method and Description |
---|---|
Optional<ConnectionProvider> |
getConnectionProvider() |
ConfigurationModel |
getModel() |
String |
getName() |
ConfigurationState |
getState() |
ConfigurationStats |
getStatistics() |
Object |
getValue() |
String getName()
ConfigurationModel getModel()
ConfigurationModel
this instance is based onObject getValue()
ConfigurationStats getStatistics()
ConfigurationStats
object with statistics about the usage of the configurationOptional<ConnectionProvider> getConnectionProvider()
Optional
which (maybe) holds the ConnectionProvider
to be used with this
ConfigurationInstance
ConfigurationState getState()
ConfigurationState
holding the parameter values for this
instance.Copyright © 2018. All rights reserved.