public abstract class AbstractApplication extends AbstractEntity implements StartableApplication
init() method, and in there should create
their entities.AbstractEntity.BasicConfigurationSupport, AbstractEntity.BasicEnricherSupport, AbstractEntity.BasicGroupSupport, AbstractEntity.BasicPolicySupport, AbstractEntity.BasicSensorSupport, AbstractEntity.BasicSubscriptionSupportEntity.AdjunctSupport<T extends EntityAdjunct>, Entity.EnricherSupport, Entity.GroupSupport, Entity.PolicySupport, Entity.SensorSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportStartable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBodyEntityInternal.EnricherSupportInternal, EntityInternal.EntitySubscriptionSupportInternal, EntityInternal.FeedSupport, EntityInternal.GroupSupportInternal, EntityInternal.PolicySupportInternal, EntityInternal.SensorSupportInternalBrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternalAPPLICATION_ID, CATALOG_ID, CHILD_ADDED, CHILD_REMOVED, CONFIG_KEY_ADDED, CONFIG_KEY_REMOVED, DEFAULT_DISPLAY_NAME, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, ENTITY_ID, GROUP_ADDED, GROUP_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVEDDESTROY_ON_STOP, RUNNING_QUORUM_CHECK, START_LATCH, UP_QUORUM_CHECKRESTART, 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 sets ID sensors and calls
AbstractEntity.initEnrichers(). |
void |
onManagementStarted()
Invoked by
EntityManagementSupport when this entity is fully managed and visible to other entities
through the management context. |
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, addFeed, addLocations, addLocationsWithoutPublishing, clearLocations, clearParent, config, configure, configure, destroy, enrichers, equals, feeds, firstLocation, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getCreationTime, getDisplayName, getEffector, getEntityType, getExecutionContext, getIconUrl, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getProxy, getProxyIfAvailable, getRebindSupport, groups, hashCode, invalidateReferences, invoke, invoke, invoke, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarting, policies, relations, removeChild, removeLocations, requestPersist, resetProxy, sensors, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setManagementContext, setProxy, subscriptions, toMetadataRecord, toStringaddSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, rebind, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId, tagsgetManagementContextaddChild, addChild, addFeed, clearParent, enrichers, getApplicationId, getAttribute, getChildren, getConfig, getCreationTime, getDisplayName, getEntityType, getIconUrl, getId, getLocations, getParent, groups, invoke, policies, relations, removeChild, sensors, setDisplayNamegetCatalogItemId, getCatalogItemIdSearchPath, subscriptions, tagsconfig, getConfigaddSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemIdpublic AbstractApplication()
@Deprecated public AbstractApplication(java.util.Map properties)
@Deprecated
public AbstractApplication(java.util.Map properties,
Entity parent)
public void init()
AbstractEntityAbstractEntity.initEnrichers().init in class AbstractEntitypublic Application getApplication()
AbstractEntitygetApplication in interface EntitygetApplication in class AbstractEntityApplication this entity is registered with, or null if not registered.public AbstractApplication setParent(Entity parent)
AbstractEntitysetParent in interface EntitysetParent in class AbstractEntityEntity.getParent(),
Entity.clearParent()public void onManagementStarted()
AbstractEntityEntityManagementSupport when this entity is fully managed and visible to other entities
through the management context.onManagementStarted in class AbstractEntitypublic 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()
AbstractEntityEntityManagementSupport 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