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

@Override
protected void connectSensors()


getDriver

@Override
public KarafDriver getDriver()


getDriverInterface

@Override
public java.lang.Class getDriverInterface()


installBundle

@Description("Deploys the given bundle, returning the bundle id - see osgi.core:type=framework#installBundle()")
public long installBundle(@NamedParameter("bundle") @Description("URI of bundle to be deployed") java.lang.String bundle)
throws URISyntaxException If bundle name is not a valid URI


installFeature

@Description("Updates the OSGi Service's properties, adding (and overriding) the given key-value pairs")
public void installFeature(@NamedParameter("featureName") @Description("Name of the feature - see org.apache.karaf:type=features#installFeature()") java.lang.String featureName)


listBundles

public java.util.Map listBundles()


postDriverStart

@Override
protected void postDriverStart()


preStop

@Override
protected void preStop()


uninstallBundle

@Description("Undeploys the bundle with the given id")
public void uninstallBundle(@NamedParameter("bundleId") @Description("Id of the bundle") java.lang.Long bundleId)


updateServiceProperties

@Description("Updates the OSGi Service's properties, adding (and overriding) the given key-value pairs")
public void updateServiceProperties(@NamedParameter("serviceName") @Description("Name of the OSGi service") 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.