Brooklyn

brooklyn.entity.proxy
[Java] Class AbstractController

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
          brooklyn.entity.basic.SoftwareProcessEntity
              brooklyn.entity.proxy.AbstractController
All Implemented Interfaces:
LoadBalancer

public abstract class AbstractController
extends SoftwareProcessEntity

Represents a controller mechanism for a Cluster.


Field Summary
static BasicAttributeSensorAndConfigKey DOMAIN_NAME

protected static Logger LOG

static BasicAttributeSensorAndConfigKey PORT_NUMBER_SENSOR

sensor for port to forward to on target entities

static BasicAttributeSensorAndConfigKey PROTOCOL

static PortAttributeSensorAndConfigKey PROXY_HTTP_PORT

port where this controller should live

static MethodEffector RELOAD

static BasicAttributeSensor ROOT_URL

static BasicAttributeSensor SERVER_POOL_TARGETS

static BasicConfigKey SSL_CONFIG

static BasicAttributeSensor TARGETS

@deprecated Use SERVER_POOL_TARGETS

protected boolean isActive

protected java.util.Set serverPoolAddresses

protected AbstractMembershipTrackingPolicy serverPoolMemberTrackerPolicy

protected java.util.Set serverPoolTargets

protected boolean updateNeeded

 
Fields inherited from class SoftwareProcessEntity
ADDRESS, CUSTOMIZE_LATCH, HOSTNAME, INSTALL_LATCH, LAUNCH_LATCH, PROVISIONING_PROPERTIES, SERVICE_STATE, SHELL_ENVIRONMENT, START_LATCH, SUGGESTED_INSTALL_DIR, SUGGESTED_RUN_DIR, SUGGESTED_VERSION, sensorRegistry
 
Fields inherited from class AbstractEntity
LOG, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, application, attributesInternal, configsInternal, execution, managementContext, managementData, subscription, tempWorkings
 
Constructor Summary
AbstractController()

AbstractController(java.util.Map properties)

AbstractController(Entity owner)

AbstractController(java.util.Map properties, Entity owner)

AbstractController(Entity owner, Cluster cluster)

AbstractController(java.util.Map properties, Entity owner, Cluster cluster)

 
Method Summary
protected void addServerPoolMember(Entity member)

protected boolean belongsInServerPool(Entity member)

void bind(java.util.Map flags)

Opportunity to do late-binding of the cluster that is being controlled.

Entity configure(java.util.Map flags)

protected java.lang.String getAddressOfEntity(Entity member)

java.lang.String getDomain()

returns primary domain this controller responds to, or null if it responds to all domains

java.lang.Integer getPort()

AttributeSensor getPortNumberSensor()

java.lang.String getProtocol()

protected java.util.Collection getRequiredOpenPorts()

java.lang.String getUrl()

primary URL this controller serves, if one can / has been inferred

protected java.lang.String inferProtocol()

protected java.lang.String inferUrl()

returns URL, if it can be inferred; null otherwise

boolean isActive()

protected void onServerPoolMemberChanged(Entity member)

protected void postStart()

protected void preStart()

protected void preStop()

protected void reconfigureService()

Implementations should update the configuration so that 'serverPoolAddresses' are targeted.

void reload()

protected void removeServerPoolMember(Entity member)

protected void reset()

void update()

 
Methods inherited from class SoftwareProcessEntity
checkAllSensorsConnected, checkModifiable, connectSensors, getDriver, getLocalHostname, getProvisioningFlags, getProvisioningLocation, getRequiredOpenPorts, initDriver, newDriver, obtainProvisioningFlags, postActivation, postStart, preStart, preStop, removeFirstMatchingLocation, removeFirstMatchingLocation, restart, setProvisioningLocation, start, startInLocation, startInLocation, startInLocation, stop, stopInLocation, waitForEntityStart, waitForServiceUp, waitForServiceUp
 
Methods inherited from class AbstractEntity
addEnricher, addGroup, addOwnedChild, addPolicy, assertNotYetOwned, clearOwner, configure, configure, destroy, emit, emitInternal, firstLocation, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getConfig, getConfig, getConfig, getConfig, getConfigMap, getEffector, getEnrichers, getEntityType, getExecutionContext, getGroups, getLocations, getManagementContext, getMutableEntityType, getOwnedChildren, getOwner, getPolicies, getSubscriptionContext, getSubscriptionTracker, hasEverBeenManaged, invalidate, invoke, invoke, invokeFromJava, invokeMethod, onManagementBecomingMaster, onManagementNoLongerMaster, refreshInheritedConfig, refreshInheritedConfigOfChildren, removeAllEnrichers, removeAllPolicies, removeAttribute, removeEnricher, removeOwnedChild, removePolicy, setApplication, setAttribute, setAttribute, setBeingManaged, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setOwner, subscribe, subscribeToChildren, subscribeToMembers, toString, toStringFieldsToInclude, 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

DOMAIN_NAME

@SetFromFlag("domain")
public static final BasicAttributeSensorAndConfigKey DOMAIN_NAME


LOG

protected static final Logger LOG


PORT_NUMBER_SENSOR

@SetFromFlag("portNumberSensor")
public static final BasicAttributeSensorAndConfigKey PORT_NUMBER_SENSOR
sensor for port to forward to on target entities


PROTOCOL

@SetFromFlag("protocol")
public static final BasicAttributeSensorAndConfigKey PROTOCOL


PROXY_HTTP_PORT

@SetFromFlag("port")
    /** port where this controller should live */
public static final PortAttributeSensorAndConfigKey PROXY_HTTP_PORT
port where this controller should live


RELOAD

public static final MethodEffector RELOAD


ROOT_URL

public static final BasicAttributeSensor ROOT_URL


SERVER_POOL_TARGETS

public static final BasicAttributeSensor SERVER_POOL_TARGETS


SSL_CONFIG

@SetFromFlag("ssl")
public static final BasicConfigKey SSL_CONFIG


TARGETS

public static final BasicAttributeSensor TARGETS
deprecated:
Use SERVER_POOL_TARGETS


isActive

protected boolean isActive


serverPoolAddresses

protected java.util.Set serverPoolAddresses


serverPoolMemberTrackerPolicy

protected AbstractMembershipTrackingPolicy serverPoolMemberTrackerPolicy


serverPoolTargets

protected java.util.Set serverPoolTargets


updateNeeded

protected boolean updateNeeded


 
Constructor Detail

AbstractController

public AbstractController()


AbstractController

public AbstractController(java.util.Map properties)


AbstractController

public AbstractController(Entity owner)


AbstractController

public AbstractController(java.util.Map properties, Entity owner)


AbstractController

public AbstractController(Entity owner, Cluster cluster)


AbstractController

public AbstractController(java.util.Map properties, Entity owner, Cluster cluster)


 
Method Detail

addServerPoolMember

protected void addServerPoolMember(Entity member)


belongsInServerPool

protected boolean belongsInServerPool(Entity member)


bind

public void bind(java.util.Map flags)
Opportunity to do late-binding of the cluster that is being controlled. Must be called before start(). Can pass in the 'cluster'.


configure

@Override
public Entity configure(java.util.Map flags)


getAddressOfEntity

protected java.lang.String getAddressOfEntity(Entity member)


getDomain

public java.lang.String getDomain()
returns primary domain this controller responds to, or null if it responds to all domains


getPort

public java.lang.Integer getPort()


getPortNumberSensor

public AttributeSensor getPortNumberSensor()


getProtocol

public java.lang.String getProtocol()


getRequiredOpenPorts

@Override
protected java.util.Collection getRequiredOpenPorts()


getUrl

public java.lang.String getUrl()
primary URL this controller serves, if one can / has been inferred


inferProtocol

protected java.lang.String inferProtocol()


inferUrl

protected java.lang.String inferUrl()
returns URL, if it can be inferred; null otherwise


isActive

public boolean isActive()


onServerPoolMemberChanged

protected void onServerPoolMemberChanged(Entity member)


postStart

@Override
protected void postStart()


preStart

@Override
protected void preStart()


preStop

protected void preStop()


reconfigureService

protected void reconfigureService()
Implementations should update the configuration so that 'serverPoolAddresses' are targeted. The caller will subsequently call reload to apply the new configuration.


reload

@Description("Forces reload of the configuration")
public void reload()


removeServerPoolMember

protected void removeServerPoolMember(Entity member)


reset

protected void reset()


update

public void update()


 

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