public class ControlledDynamicWebAppClusterImpl extends DynamicGroupImpl implements ControlledDynamicWebAppCluster
AbstractEntity.BasicConfigurationSupport, AbstractEntity.BasicEnricherSupport, AbstractEntity.BasicGroupSupport, AbstractEntity.BasicPolicySupport, AbstractEntity.BasicSensorSupport, AbstractEntity.BasicSubscriptionSupport
Entity.AdjunctSupport<T extends EntityAdjunct>, Entity.EnricherSupport, Entity.GroupSupport, Entity.PolicySupport, Entity.SensorSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Startable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBody
Resizable.InsufficientCapacityException
JavaWebAppService.CanDeployAndUndeploy, JavaWebAppService.CanRedeployAll
WebAppServiceMetrics.Initializer
EntityInternal.EnricherSupportInternal, EntityInternal.EntitySubscriptionSupportInternal, EntityInternal.FeedSupport, EntityInternal.GroupSupportInternal, EntityInternal.PolicySupportInternal, EntityInternal.SensorSupportInternal
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
APPLICATION_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_REMOVED
CLUSTER, CONTROLLED_GROUP, CONTROLLER, CONTROLLER_SPEC, HOSTNAME, INITIAL_SIZE, MEMBER_SPEC, SERVICE_STATE_ACTUAL, WEB_CLUSTER_SPEC
ENTITY_FILTER, RESCAN_EFFECTOR, RUNNING
FIRST, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECK
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
RESTART, SERVICE_UP, START, STOP
REPLACE_MEMBER
NAMED_WARS, ROOT_WAR, WARS_BY_CONTEXT
ENABLED_PROTOCOLS, HTTP_PORT, HTTPS_PORT, HTTPS_SSL_CONFIG, ROOT_URL
BYTES_RECEIVED, BYTES_SENT, ERROR_COUNT, MAX_PROCESSING_TIME, PROCESSING_TIME_FRACTION_IN_WINDOW, PROCESSING_TIME_FRACTION_LAST, REQUEST_COUNT, REQUESTS_PER_SECOND_IN_WINDOW, REQUESTS_PER_SECOND_LAST, TOTAL_PROCESSING_TIME
CHECK_JAVA_HOSTNAME_BUG, JAVA_OPTS, JAVA_SYSPROPS, JAVA_VERSION_REQUIRED
DEPLOY, DEPLOYED_WARS, UNDEPLOY
REDEPLOY_ALL
Constructor and Description |
---|
ControlledDynamicWebAppClusterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
deploy(java.lang.String url,
java.lang.String targetName)
Deploys the given artifact, from a source URL, to a given deployment filename/context.
|
DynamicWebAppCluster |
getCluster() |
Group |
getControlledGroup() |
LoadBalancer |
getController() |
java.lang.Integer |
getCurrentSize() |
void |
init()
Default entity initialization sets ID sensors and calls
AbstractEntity.initEnrichers() . |
void |
rebind()
Called by framework on rebind (in new-style instances):
after configuring, but
before the instance is managed, and
before adjuncts are attached to entities, and
before a reference to an object is shared.
|
void |
redeployAll() |
java.lang.String |
replaceMember(java.lang.String memberId)
Replaces the entity with the given ID, if it is a member.
|
java.lang.Integer |
resize(java.lang.Integer desiredSize)
Grow or shrink this entity to the desired size.
|
void |
restart()
Restart the entity.
|
void |
start(java.util.Collection<? extends Location> locations)
Start the entity in the given collection of locations.
|
void |
stop()
Stops this group.
|
void |
undeploy(java.lang.String targetName)
For the DEPLOYED_WARS to be updated, the input must match the result of the call to deploy,
e.g.
|
addSubscription, addSubscription, entityFilter, onManagementBecomingMaster, onManagementNoLongerMaster, rescanEntities, setEntityFilter
addMember, addMemberChild, addMemberChild, addMemberInternal, getMembers, hasMember, removeMember, setManagementContext, setMembers, setMembers
addChild, addChild, addFeed, addLocations, addLocationsWithoutPublishing, clearLocations, clearParent, config, configure, configure, destroy, enrichers, equals, feeds, firstLocation, getApplication, 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, onManagementStarted, onManagementStarting, onManagementStopped, policies, relations, removeChild, removeLocations, requestPersist, resetProxy, sensors, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setParent, setProxy, subscriptions, toMetadataRecord, toString
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId, tags
addSubscription, addSubscription, entityFilter, rescanEntities, setEntityFilter
getFirst, setMembers, setMembers
addChild, addChild, addMember, addMemberChild, addMemberChild, getMembers, hasMember, removeMember
addFeed, clearParent, enrichers, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getCreationTime, getDisplayName, getEntityType, getIconUrl, getId, getLocations, getParent, groups, invoke, policies, relations, removeChild, sensors, setDisplayName, setParent
getCatalogItemId, getCatalogItemIdSearchPath, subscriptions, tags
config, getConfig
addSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
public void init()
AbstractEntity
AbstractEntity.initEnrichers()
.init
in class DynamicGroupImpl
public void rebind()
AbstractBrooklynObject
AbstractBrooklynObject.init()
will not be called on rebind.
If you need to intercept behaviour after adjuncts are attached,
consider AbstractEntity.onManagementStarting()
(but probably worth raising a discussion on the mailing list!)
rebind
in class AbstractBrooklynObject
public LoadBalancer getController()
getController
in interface ControlledDynamicWebAppCluster
public DynamicWebAppCluster getCluster()
getCluster
in interface ControlledDynamicWebAppCluster
public Group getControlledGroup()
getControlledGroup
in interface ControlledDynamicWebAppCluster
public void start(java.util.Collection<? extends Location> locations)
Startable
Some entities may define custom Effector
implementations which support
a richer set of parameters. See the entity-specific Startable.START
effector declaration.
public void stop()
DynamicGroup
Does not stop any of its members. De-activates the filter and unsubscribes to entity-updates, so the membership of the group will not change.
stop
in interface Startable
stop
in interface DynamicGroup
stop
in class DynamicGroupImpl
public void restart()
Startable
Some entities may define custom Effector
implementations which support
a richer set of parameters. See the entity-specific Startable.RESTART
effector declaration.
public java.lang.Integer resize(java.lang.Integer desiredSize)
Resizable
public java.lang.String replaceMember(java.lang.String memberId)
MemberReplaceable
First adds a new member, then removes this one.
replaceMember
in interface MemberReplaceable
memberId
- entity id of a member to be replacedpublic java.lang.Integer getCurrentSize()
getCurrentSize
in interface Group
getCurrentSize
in interface Resizable
getCurrentSize
in class AbstractGroupImpl
public void deploy(java.lang.String url, java.lang.String targetName)
JavaWebAppService.CanDeployAndUndeploy
either ROOT.WAR or / denotes root context
anything of form FOO.?AR (ending .?AR) is copied with that name (unless copying not necessary) and is expected to be served from /FOO
anything of form /FOO (with leading slash) is expected to be served from /FOO (and is copied as FOO.WAR)
anything of form FOO (without a dot) is expected to be served from /FOO (and is copied as FOO.WAR)
otherwise please note behaviour may vary on different appservers; e.g. FOO.FOO would probably be ignored on appservers which expect a file copied across (usually), but served as /FOO.FOO on systems that take a deployment context.
See FileNameToContextMappingTest
for definitive examples!
deploy
in interface JavaWebAppService.CanDeployAndUndeploy
url
- where to get the war, as a URL, either classpath://xxx or file:///home/xxx or http(s)...targetName
- where to tell the server to serve the WAR, see abovepublic void undeploy(java.lang.String targetName)
JavaWebAppService.CanDeployAndUndeploy
undeploy
in interface JavaWebAppService.CanDeployAndUndeploy
public void redeployAll()
redeployAll
in interface JavaWebAppService.CanRedeployAll