Brooklyn

brooklyn.entity.osgi.karaf
[Java] Class KarafContainerImpl

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
          brooklyn.entity.basic.SoftwareProcessImpl
              brooklyn.entity.osgi.karaf.KarafContainerImpl
All Implemented Interfaces:
KarafContainer

public class KarafContainerImpl
extends SoftwareProcessImpl

This sets up a Karaf OSGi container


Field Summary
static java.lang.String KARAF_ADMIN

static java.lang.String KARAF_FEATURES

protected static Logger LOG

static java.lang.String OSGI_BUNDLE_STATE

static java.lang.String OSGI_COMPENDIUM

static java.lang.String OSGI_FRAMEWORK

protected JmxSensorAdapter jmxAdapter

protected JmxHelper jmxHelper

 
Fields inherited from class SoftwareProcessImpl
sensorRegistry
 
Fields inherited from class AbstractEntity
LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, attributesInternal, configsInternal, managementSupport, tempWorkings
 
Constructor Summary
KarafContainerImpl()

KarafContainerImpl(java.util.Map properties)

KarafContainerImpl(Entity parent)

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

 
Method Summary
protected void connectSensors()

KarafDriver getDriver()

java.lang.Class getDriverInterface()

long installBundle(java.lang.String bundle)

throws URISyntaxException If bundle name is not a valid URI

void installFeature(java.lang.String featureName)

java.util.Map listBundles()

protected void postDriverStart()

protected void preStop()

void uninstallBundle(java.lang.Long bundleId)

void updateServiceProperties(java.lang.String serviceName, java.util.Map additionalVals)

protected void uploadPropertyFiles(java.util.Map propertyFiles)

 
Methods inherited from class SoftwareProcessImpl
callRebindHooks, callStartHooks, checkModifiable, connectSensors, connectServiceUpIsRunning, disconnectSensors, disconnectServiceUpIsRunning, doInitDriver, getDriver, getLocalHostname, getMachineOrNull, getProvisioningFlags, getProvisioningLocation, getRequiredOpenPorts, newDriver, obtainProvisioningFlags, onManagementStarted, onManagementStarting, postDriverRestart, postDriverStart, postRebind, postRestart, postStart, preStart, preStop, rebind, restart, setProvisioningLocation, start, startInLocation, startInLocation, startInLocation, startInLocation, stop, stopInLocation, waitForEntityStart, waitForServiceUp, waitForServiceUp, waitForServiceUp
 
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

KARAF_ADMIN

public static final java.lang.String KARAF_ADMIN


KARAF_FEATURES

public static final java.lang.String KARAF_FEATURES


LOG

protected static final Logger LOG


OSGI_BUNDLE_STATE

public static final java.lang.String OSGI_BUNDLE_STATE


OSGI_COMPENDIUM

public static final java.lang.String OSGI_COMPENDIUM


OSGI_FRAMEWORK

public static final java.lang.String OSGI_FRAMEWORK


jmxAdapter

protected JmxSensorAdapter jmxAdapter


jmxHelper

protected JmxHelper jmxHelper


 
Constructor Detail

KarafContainerImpl

public KarafContainerImpl()


KarafContainerImpl

public KarafContainerImpl(java.util.Map properties)


KarafContainerImpl

public KarafContainerImpl(Entity parent)


KarafContainerImpl

public KarafContainerImpl(java.util.Map properties, Entity parent)


 
Method Detail

connectSensors

protected void connectSensors() {
protected void connectSensors()


getDriver

public KarafDriver getDriver() {
public KarafDriver getDriver()


getDriverInterface

public Class getDriverInterface() {
public java.lang.Class getDriverInterface()


installBundle

//  - dropping file into $RUN_DIR/deploy (but that would be async)
public long installBundle(uri = new URI(bundle);  java.lang.String bundle)
throws URISyntaxException If bundle name is not a valid URI


installFeature

return true;
public void installFeature(  java.lang.String featureName)


listBundles

public java.util.Map listBundles()


postDriverStart

jmxHelper.connect(JmxSensorAdapter.JMX_CONNECTION_TIMEOUT_MS);
protected void postDriverStart()


preStop

protected void preStop()


uninstallBundle

}
public void uninstallBundle(d void uploadPropertyFiles(M ap> pro java.lang.Long bundleId)


updateServiceProperties

try {
public void updateServiceProperties(String key = entry.getKey() ; java.lang.String serviceName, java.util.Map additionalVals)


uploadPropertyFiles

protected void uploadPropertyFiles(java.util.Map propertyFiles)


 

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