public abstract class AbstractEntityAdjunct extends AbstractBrooklynObject implements BrooklynObjectInternal, EntityAdjunct, Configurable
Modifier and Type | Class and Description |
---|---|
class |
AbstractEntityAdjunct.AdjunctTagSupport |
class |
AbstractEntityAdjunct.BasicSubscriptionSupport |
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HIGHLIGHT_NAME_LAST_ACTION
Name of a highlight that indicates the last action taken by this adjunct.
|
static java.lang.String |
HIGHLIGHT_NAME_LAST_CONFIRMATION
Name of a highlight that indicates the last confirmation detected by this adjunct.
|
static java.lang.String |
HIGHLIGHT_NAME_LAST_VIOLATION
Name of a highlight that indicates the last violation detected by this adjunct.
|
static java.lang.String |
HIGHLIGHT_NAME_TRIGGERS
Name of a highlight that indicates the triggers for this adjunct.
|
Constructor and Description |
---|
AbstractEntityAdjunct() |
AbstractEntityAdjunct(java.util.Map properties) |
Modifier and Type | Method and Description |
---|---|
BrooklynObjectInternal.ConfigurationSupportInternal |
config() |
AbstractEntityAdjunct |
configure(java.util.Map flags)
Deprecated.
since 0.7.0; only used for legacy brooklyn types where constructor is called directly
|
void |
destroy()
Unsubscribes and clears all managed subscriptions; is called by the owning entity when a policy is removed
and should always be called by any subclasses overriding this method
|
AdjunctType |
getAdjunctType() |
<T> T |
getConfig(ConfigKey<T> key)
Convenience for calling
Configurable.ConfigurationSupport.get(ConfigKey) ,
via code like config().get(key) . |
java.lang.String |
getDisplayName()
A display name; recommended to be a concise single-line description.
|
Entity |
getEntity() |
ExecutionContext |
getExecutionContext()
If the entity has been set, returns the execution context indicating this adjunct.
|
java.util.Map<java.lang.String,HighlightTuple> |
getHighlights() |
ManagementContext |
getManagementContext() |
java.lang.String |
getUniqueTag()
An optional tag used to identify adjuncts with a specific purpose, typically created by the caller.
|
boolean |
isDestroyed()
Whether the adjunct is destroyed
|
boolean |
isRunning()
Whether the adjunct is available/active, ie started and not stopped or interrupted
|
void |
setDisplayName(java.lang.String name) |
void |
setEntity(EntityLocal entity) |
void |
setHighlights(java.util.Map<java.lang.String,HighlightTuple> highlights)
Should only be used for rebind
|
AbstractEntityAdjunct.BasicSubscriptionSupport |
subscriptions()
Subscriptions are the mechanism for receiving notifications of sensor-events (e.g.
|
BrooklynObject.TagSupport |
tags()
Tags are arbitrary objects which can be attached to an entity for subsequent reference.
|
java.lang.String |
toString() |
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, init, rebind, relations, setCatalogItemId, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemId
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSearchPath, getRebindSupport, relations, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
getId
getCatalogItemId, getCatalogItemIdSearchPath
public static java.lang.String HIGHLIGHT_NAME_LAST_ACTION
public static java.lang.String HIGHLIGHT_NAME_LAST_CONFIRMATION
public static java.lang.String HIGHLIGHT_NAME_LAST_VIOLATION
public static java.lang.String HIGHLIGHT_NAME_TRIGGERS
public AbstractEntityAdjunct()
public AbstractEntityAdjunct(java.util.Map properties)
@Deprecated public AbstractEntityAdjunct configure(java.util.Map flags)
AbstractBrooklynObject
ConfigBag.getUnusedConfig()
.
To be overridden by AbstractEntity, AbstractLoation, AbstractPolicy, AbstractEnricher, etc.
But should not be overridden by specific entity types. If you do, the entity may break in subsequent releases. Also note that if you require fields to be initialized you must do that in this method. You must *not* rely on field initializers because they may not run until *after* this method (this method is invoked by the constructor in this class, so initializers in subclasses will not have run when this overridden method is invoked.)
public ExecutionContext getExecutionContext()
public BrooklynObjectInternal.ConfigurationSupportInternal config()
config
in interface Configurable
config
in interface BrooklynObjectInternal
public AbstractEntityAdjunct.BasicSubscriptionSupport subscriptions()
BrooklynObject
subscriptions
in interface BrooklynObject
subscriptions
in interface BrooklynObjectInternal
public <T> T getConfig(ConfigKey<T> key)
Configurable
Configurable.ConfigurationSupport.get(ConfigKey)
,
via code like config().get(key)
.getConfig
in interface Configurable
public AdjunctType getAdjunctType()
public java.lang.String getDisplayName()
BrooklynObject
getDisplayName
in interface BrooklynObject
public void setDisplayName(java.lang.String name)
setDisplayName
in class AbstractBrooklynObject
public ManagementContext getManagementContext()
getManagementContext
in interface BrooklynObjectInternal
getManagementContext
in class AbstractBrooklynObject
public void setEntity(EntityLocal entity)
public Entity getEntity()
public void destroy()
public boolean isDestroyed()
EntityAdjunct
isDestroyed
in interface EntityAdjunct
public boolean isRunning()
EntityAdjunct
isRunning
in interface EntityAdjunct
public java.lang.String getUniqueTag()
EntityAdjunct
This will be included in the call to #getTags()
.
getUniqueTag
in interface EntityAdjunct
public BrooklynObject.TagSupport tags()
BrooklynObject
ImmutableMap
may be used under the covers; also there is little point!);
and they should be amenable to our persistence (on-disk serialization) and our JSON serialization in the REST API.tags
in interface BrooklynObject
tags
in class AbstractBrooklynObject
public java.util.Map<java.lang.String,HighlightTuple> getHighlights()
getHighlights
in interface EntityAdjunct
public void setHighlights(java.util.Map<java.lang.String,HighlightTuple> highlights)
highlights
- public java.lang.String toString()
toString
in class java.lang.Object