org.apache.felix.dependencymanager
Class DependencyManager

java.lang.Object
  extended by org.apache.felix.dependencymanager.DependencyManager

public class DependencyManager
extends java.lang.Object

The dependency manager. Manages all services and their dependencies.

Author:
Felix Project Team

Constructor Summary
DependencyManager(org.osgi.framework.BundleContext context)
          Creates a new dependency manager.
 
Method Summary
 void add(Service service)
          Adds a new service to the dependency manager.
 Service createService()
          Creates a new service.
 ServiceDependency createServiceDependency()
          Creates a new service dependency.
 java.util.List getServices()
          Returns a list of services.
 void remove(Service service)
          Removes a service from the dependency manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyManager

public DependencyManager(org.osgi.framework.BundleContext context)
Creates a new dependency manager.

Parameters:
context - the bundle context
Method Detail

add

public void add(Service service)
Adds a new service to the dependency manager. After the service was added it will be started immediately.

Parameters:
service - the service to add

remove

public void remove(Service service)
Removes a service from the dependency manager. Before the service is removed it is stopped first.

Parameters:
service - the service to remove

createService

public Service createService()
Creates a new service.

Returns:
the new service

createServiceDependency

public ServiceDependency createServiceDependency()
Creates a new service dependency.

Returns:
the service dependency

getServices

public java.util.List getServices()
Returns a list of services.

Returns:
a list of services