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.
Constructor and Description |
---|
BasicConfigurableObject() |
Modifier and Type | Method and Description |
---|---|
ManagementContext |
getBrooklynManagementContext() |
<T> T |
getConfig(ConfigKey<T> key) |
java.lang.String |
getId() |
void |
injectManagementContext(ManagementContext managementContext)
Sets the
ManagementContext reference. |
<T> T |
setConfig(ConfigKey<T> key,
T value)
returns the old value, or null if there was not one
|
public void injectManagementContext(ManagementContext managementContext)
ManagementContextInjectable
ManagementContext
reference.injectManagementContext
in interface ManagementContextInjectable
public ManagementContext getBrooklynManagementContext()
getBrooklynManagementContext
in interface HasBrooklynManagementContext
public java.lang.String getId()
getId
in interface Identifiable
public <T> T setConfig(ConfigKey<T> key, T value)
Configurable
setConfig
in interface Configurable
public <T> T getConfig(ConfigKey<T> key)