Brooklyn

brooklyn.entity.basic
[Java] Class AbstractApplication

java.lang.Object
  brooklyn.entity.basic.AbstractEntity
      brooklyn.entity.basic.AbstractApplication
All Implemented Interfaces:
StartableApplication

public abstract class AbstractApplication
extends AbstractEntity

Users can extend this to define the entities in their application, and the relationships between those entities. Users should override the init() method, and in there should create their entities.


Field Summary
static Logger log

 
Fields inherited from class AbstractEntity
EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, managementSupport, tempWorkings
 
Constructor Summary
AbstractApplication()

AbstractApplication(java.util.Map properties)

@deprecated since 0.6; use EntitySpec so no-arg constructor

AbstractApplication(java.util.Map properties, Entity parent)

Constructor for when application is nested inside another application

 
Method Summary
Application getApplication()

void init()

void onManagementStopped()

void postStart(java.util.Collection locations)

Default is no-op.

void preStart(java.util.Collection locations)

Default is no-op.

void restart()

protected void setApplication(Application app)

AbstractApplication setParent(Entity parent)

void start(java.util.Collection locations)

Default start will start all Startable children (child.start(Collection

void stop()

 
Methods inherited from class AbstractEntity
addChild, addChild, addEnricher, addGroup, addLocations, addPolicy, clearLocations, clearParent, configure, configure, configure, configure, configure, configure, destroy, emit, emitInternal, equals, finalize, firstLocation, getAllAttributes, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getGroups, getIconUrl, getId, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getSubscriptionTracker, hashCode, init, invalidateReferences, invoke, invoke, invoke, isLegacyConstruction, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeLocations, removePolicy, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, toStringHelper, unsubscribe, unsubscribe
 

Field Detail

log

public static final Logger log


 
Constructor Detail

AbstractApplication

public AbstractApplication()


AbstractApplication

@Deprecated
public AbstractApplication(java.util.Map properties)
deprecated:
since 0.6; use EntitySpec so no-arg constructor


AbstractApplication

@Deprecated
public AbstractApplication(java.util.Map properties, Entity parent)
Constructor for when application is nested inside another application
deprecated:
Nesting applications is not currently supported


 
Method Detail

getApplication

@Override
public Application getApplication()


init

@Override
public void init()


onManagementStopped

if (getManagementContext().isRunning()) {
public void onManagementStopped()


postStart

public void postStart(java.util.Collection locations)
Default is no-op. Subclasses can override.


preStart

public void preStart(java.util.Collection locations)
Default is no-op. Subclasses can override.


restart

try {
public void restart()


setApplication

@Override
protected void setApplication(Application app)


setParent

return this;
public AbstractApplication setParent(Entity parent)


start

public void start(java.util.Collection locations)
Default start will start all Startable children (child.start(Collection)), calling preStart(locations) first and postStart(locations) afterwards.


stop

recordApplicationEvent(Lifecycle.STOPPING);
public void stop()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.