Brooklyn

brooklyn.entity.basic
[Java] Class AbstractApplication

java.lang.Object
  groovy.lang.GroovyObjectSupport
      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
LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, attributesInternal, configsInternal, managementSupport, tempWorkings
 
Constructor Summary
AbstractApplication()

AbstractApplication(java.util.Map properties)

Usual constructor, takes a set of properties; also (experimental) permits defining a brooklynProperties source

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

Constructor for when application is nested inside another application

 
Method Summary
Application getApplication()

boolean hasManagementContext()

@deprecated since 0.4.0; use getManagementSupport().isDeployed()

void init()

boolean isDeployed()

@deprecated use getManagementSupport().isDeployed, which is not linked to start/stop

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)

void setManagementContext(AbstractManagementContext mgmt)

@deprecated since 0.4.0 use mgmt.manage(app)

AbstractApplication setParent(Entity parent)

void start(java.util.Collection locations)

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

void stop()

Default stop will stop all Startable children

 
Methods inherited from class AbstractEntity
addChild, addChild, addEnricher, addGroup, addLocations, addOwnedChild, addPolicy, assertNotYetOwned, clearOwner, clearParent, configure, configure, configure, configure, configure, createManagementSupport, destroy, emit, emitInternal, equals, finalize, firstLocation, getAllAttributes, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getChildrenReference, getConfig, getConfig, getConfig, getConfig, getConfigMap, getDisplayName, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getGroups, getId, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getOwnedChildren, getOwnedChildrenReference, getOwner, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getSubscriptionTracker, hasEverBeenManaged, hashCode, init, invalidateReferences, invoke, invoke, invokeFromJava, invokeMethod, isLegacyConstruction, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, refreshInheritedConfig, refreshInheritedConfigOfChildren, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeLocations, removeOwnedChild, removePolicy, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setBeingManaged, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDisplayName, setManagementContext, setOwner, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toString, toStringFieldsToInclude, toStringHelper, unsubscribe, unsubscribe
 
Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()
 

Field Detail

log

public static final Logger log


 
Constructor Detail

AbstractApplication

public AbstractApplication()


AbstractApplication

public AbstractApplication(java.util.Map properties)
Usual constructor, takes a set of properties; also (experimental) permits defining a brooklynProperties source


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()


hasManagementContext

public boolean hasManagementContext()
deprecated:
since 0.4.0; use getManagementSupport().isDeployed()


init

@Override
public void init()


isDeployed

public boolean isDeployed()
deprecated:
use getManagementSupport().isDeployed, which is not linked to start/stop


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

public void restart()


setApplication

@Override
protected void setApplication(Application app)


setManagementContext

public void setManagementContext(AbstractManagementContext mgmt)
deprecated:
since 0.4.0 use mgmt.manage(app)


setParent

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

public void stop()
Default stop will stop all Startable children


 

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