public class BasicConfigurableObject extends java.lang.Object implements Configurable, Identifiable, ManagementContextInjectable, HasBrooklynManagementContext
AbstractBrooklynObject
or similar, but wish to use ConfigKey
and Configurable
in their construction, via the
$brooklyn:object
method of the CAMP DSL.
Type coercion of values will occur when the ConfigMap
is accessed, but resolving of tasks
and other
deferred operations are assumed to have occurred prior to calling #setConfig(ConfigKey, Object)
i.e. at
object construction.
Modifier and Type | Class and Description |
---|---|
static class |
BasicConfigurableObject.BasicConfigurationSupport |
Configurable.ConfigurationSupport
Constructor and Description |
---|
BasicConfigurableObject() |
Modifier and Type | Method and Description |
---|---|
Configurable.ConfigurationSupport |
config() |
ManagementContext |
getBrooklynManagementContext() |
<T> T |
getConfig(ConfigKey<T> key)
Convenience for calling
Configurable.ConfigurationSupport.get(ConfigKey) ,
via code like config().get(key) . |
java.lang.String |
getId() |
void |
setManagementContext(ManagementContext managementContext)
Sets the
ManagementContext reference. |
public void setManagementContext(ManagementContext managementContext)
ManagementContextInjectable
ManagementContext
reference.setManagementContext
in interface ManagementContextInjectable
public ManagementContext getBrooklynManagementContext()
getBrooklynManagementContext
in interface HasBrooklynManagementContext
public java.lang.String getId()
getId
in interface Identifiable
public Configurable.ConfigurationSupport config()
config
in interface Configurable
public <T> T getConfig(ConfigKey<T> key)
Configurable
Configurable.ConfigurationSupport.get(ConfigKey)
,
via code like config().get(key)
.getConfig
in interface Configurable