org.jboss.osgi.spi.capability
Class Capability

java.lang.Object
  extended by org.jboss.osgi.spi.capability.Capability
Direct Known Subclasses:
ConfigAdminCapability, HttpCapability

public abstract class Capability
extends java.lang.Object

An abstract OSGi capability that can be installed in an OSGiRuntime. The capability is only installed if the service name given in the constructor is not already registered with the OSGi framework. It maintains an ordered set of dependent capabilities and bundles that must be installed to provide the functionality advertised by this capability.

Since:
05-May-2009
Author:
thomas.diesler@jboss.com

Constructor Summary
Capability(java.lang.String serviceName)
          Construct a capability that is identified by the given service name.
 
Method Summary
protected  void addBundle(java.lang.String bundle)
           
protected  void addDependency(Capability dependency)
           
 java.util.List<java.lang.String> getBundles()
           
 java.util.List<Capability> getDependencies()
           
 java.util.Properties getProperties()
          Get system properties provided by this capability.
 java.lang.String getServiceName()
          Get the service name associated with this capability.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Capability

public Capability(java.lang.String serviceName)
Construct a capability that is identified by the given service name. If the service name is already registered with the OSGiRuntime adding this capability does nothing.

Method Detail

getServiceName

public java.lang.String getServiceName()
Get the service name associated with this capability.


getProperties

public java.util.Properties getProperties()
Get system properties provided by this capability. Adding this capability will set the associated system properties if a propperty is not set already.


getDependencies

public java.util.List<Capability> getDependencies()

getBundles

public java.util.List<java.lang.String> getBundles()

addBundle

protected void addBundle(java.lang.String bundle)

addDependency

protected void addDependency(Capability dependency)


Copyright © 2009. All Rights Reserved.