Brooklyn

brooklyn.entity.webapp
[Java] Class JavaWebAppSoftwareProcess

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
          brooklyn.entity.basic.SoftwareProcessEntity
              brooklyn.entity.webapp.JavaWebAppSoftwareProcess
All Implemented Interfaces:
JavaWebAppService

public abstract class JavaWebAppSoftwareProcess
extends SoftwareProcessEntity

Field Summary
static AttributeSensor DEPLOYED_WARS

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

JavaWebAppSoftwareProcess(Entity owner)

JavaWebAppSoftwareProcess(java.util.Map flags)

JavaWebAppSoftwareProcess(java.util.Map flags, Entity owner)

 
Method Summary
protected void connectSensors()

void deploy(java.lang.String url, java.lang.String targetName)

Deploys the given artifact, from a source URL, to a given deployment filename/context.

void deployInitialWars()

JavaWebAppSshDriver getDriver()

void stop()

void undeploy(java.lang.String targetName)

For the DEPLOYED_WARS to be updated, the input must match the result of the call to deploy

 
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

DEPLOYED_WARS

public static final AttributeSensor DEPLOYED_WARS


 
Constructor Detail

JavaWebAppSoftwareProcess

public JavaWebAppSoftwareProcess()


JavaWebAppSoftwareProcess

public JavaWebAppSoftwareProcess(Entity owner)


JavaWebAppSoftwareProcess

public JavaWebAppSoftwareProcess(java.util.Map flags)


JavaWebAppSoftwareProcess

public JavaWebAppSoftwareProcess(java.util.Map flags, Entity owner)


 
Method Detail

connectSensors

@Override
protected void connectSensors()


deploy

@Description("Deploys the given artifact, from a source URL, to a given deployment filename/context")
public void deploy(@NamedParameter("url") java.lang.String url, @NamedParameter("targetName") java.lang.String targetName)
Deploys the given artifact, from a source URL, to a given deployment filename/context. There is some variance in expected filename/context at various servers, so the following conventions are followed:

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!

Parameters:
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 above


deployInitialWars

public void deployInitialWars()


getDriver

public JavaWebAppSshDriver getDriver()


stop

@Override
public void stop()


undeploy

@Description("Undeploys the given context/artifact")
public void undeploy(@NamedParameter("targetName") java.lang.String targetName)
For the DEPLOYED_WARS to be updated, the input must match the result of the call to deploy


 

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