org.eclipse.gemini.blueprint.extender.internal.dependencies.startup
Class DependencyServiceManager

java.lang.Object
  extended by org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyServiceManager

public class DependencyServiceManager
extends Object

ServiceListener used for tracking dependent services. Even if the ServiceListener receives event synchronously, mutable properties should be synchronized to guarantee safe publishing between threads.

Author:
Costin Leau, Hal Hildebrand, Andy Piper

Field Summary
protected  Map<org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.MandatoryServiceDependency,String> dependencies
           
protected  Map<org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.MandatoryServiceDependency,String> unsatisfiedDependencies
           
 
Constructor Summary
DependencyServiceManager(ContextExecutorAccessor executor, DelegatedExecutionOsgiBundleApplicationContext context, List<OsgiServiceDependencyFactory> dependencyFactories, Runnable executeIfDone, long maxWaitTime)
          Create a dependency manager, indicating the executor bound to, the context that contains the dependencies and the task to execute if all dependencies are met.
 
Method Summary
protected  void deregister()
           
protected  void findServiceDependencies()
           
 Map<org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.MandatoryServiceDependency,String> getUnsatisfiedDependencies()
           
protected  boolean isSatisfied()
           
protected  void register()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dependencies

protected final Map<org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.MandatoryServiceDependency,String> dependencies

unsatisfiedDependencies

protected final Map<org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.MandatoryServiceDependency,String> unsatisfiedDependencies
Constructor Detail

DependencyServiceManager

public DependencyServiceManager(ContextExecutorAccessor executor,
                                DelegatedExecutionOsgiBundleApplicationContext context,
                                List<OsgiServiceDependencyFactory> dependencyFactories,
                                Runnable executeIfDone,
                                long maxWaitTime)
Create a dependency manager, indicating the executor bound to, the context that contains the dependencies and the task to execute if all dependencies are met.

Parameters:
executor -
context -
executeIfDone -
Method Detail

findServiceDependencies

protected void findServiceDependencies()
                                throws Exception
Throws:
Exception

isSatisfied

protected boolean isSatisfied()

getUnsatisfiedDependencies

public Map<org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.MandatoryServiceDependency,String> getUnsatisfiedDependencies()

register

protected void register()

deregister

protected void deregister()


Copyright © 2006-2012. All Rights Reserved.