public abstract class AbstractApplication extends AbstractEntity implements StartableApplication
init()
method, and in there should create
their entities.BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Startable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBody
EntityInternal.FeedSupport
BrooklynObjectInternal.ConfigurationSupportInternal
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
CHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED
RESTART, SERVICE_UP, START, STOP
Constructor and Description |
---|
AbstractApplication() |
AbstractApplication(java.util.Map properties)
Deprecated.
since 0.6; use EntitySpec so no-arg constructor
|
AbstractApplication(java.util.Map properties,
Entity parent)
Deprecated.
Nesting applications is not currently supported
|
Modifier and Type | Method and Description |
---|---|
Application |
getApplication()
Returns the application, looking it up if not yet known (registering if necessary)
|
void |
init()
Default entity initialization, just calls
AbstractEntity.initEnrichers() . |
void |
onManagementStopped()
Invoked by
EntityManagementSupport when this entity is fully unmanaged. |
void |
postStart(java.util.Collection<? extends Location> locations)
Default is no-op.
|
void |
preStart(java.util.Collection<? extends Location> locations)
Default is no-op.
|
void |
restart()
default impl invokes restart on all children simultaneously
|
AbstractApplication |
setParent(Entity parent)
Adds this as a child of the given entity; registers with application if necessary.
|
void |
start(java.util.Collection<? extends Location> locations)
Default start will start all Startable children (child.start(Collection extends Location>)),
calling preStart(locations) first and postStart(locations) afterwards.
|
void |
stop()
Default stop will stop all Startable children
|
addChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, addTag, clearLocations, clearParent, config, configure, configure, configure, configure, configure, containsTag, destroy, emit, emitInternal, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityType, getExecutionContext, getFeedSupport, getGroups, getIconUrl, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getTags, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setManagementContext, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribe
getCatalogItemId, getId, getTagSupport, rebind, setCatalogItemId, tags
getManagementContext
addChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, addTag, clearParent, containsTag, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getTags, invoke, removeChild, removeEnricher, removeGroup, removePolicy, removeTag
getCatalogItemId, getTagSupport, tags
config, setConfig
setCatalogItemId
public AbstractApplication()
@Deprecated public AbstractApplication(java.util.Map properties)
@Deprecated public AbstractApplication(java.util.Map properties, Entity parent)
public void init()
AbstractEntity
AbstractEntity.initEnrichers()
.init
in class AbstractEntity
public Application getApplication()
AbstractEntity
getApplication
in interface Entity
getApplication
in class AbstractEntity
Application
this entity is registered with, or null if not registered.public AbstractApplication setParent(Entity parent)
AbstractEntity
setParent
in interface Entity
setParent
in class AbstractEntity
Entity.getParent()
,
Entity.clearParent()
public void start(java.util.Collection<? extends Location> locations)
public void preStart(java.util.Collection<? extends Location> locations)
public void postStart(java.util.Collection<? extends Location> locations)
public void stop()
public void restart()
public void onManagementStopped()
AbstractEntity
EntityManagementSupport
when this entity is fully unmanaged.
Note that the activies possible here (when unmanaged) are limited, and that this event may be caused by either a brooklyn node itself being demoted (so the entity is managed elsewhere) or by a controlled shutdown.
onManagementStopped
in class AbstractEntity