|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.framework.internal.core.CoreResolverHookFactory
public class CoreResolverHookFactory
This class encapsulates the delegation to ResolverHooks that are registered with the service registry. This way the resolver implementation only has to call out to a single hook which does all the necessary service registry lookups. This class is not thread safe and expects external synchronization.
| Constructor Summary | |
|---|---|
CoreResolverHookFactory(BundleContextImpl context,
ServiceRegistry registry)
|
|
| Method Summary | |
|---|---|
ResolverHook |
begin(java.util.Collection<BundleRevision> triggers)
This method is called by the framework each time a resolve process begins to obtain a resolver hook instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CoreResolverHookFactory(BundleContextImpl context,
ServiceRegistry registry)
| Method Detail |
|---|
public ResolverHook begin(java.util.Collection<BundleRevision> triggers)
ResolverHookFactoryresolver hook instance. This resolver hook
instance will be used for the duration of the resolve process. At the end of
the resolve process the method ResolverHook.end() must be called by
the framework and the framework must not hold any references of the resolver
hook instance.
The triggers represent the collection of bundles which triggered
the resolve process. This collection may be empty if the triggers
cannot be determined by the framework. In most cases the triggers
can easily be determined. Calling certain methods on
bundle when a bundle is in the INSTALLED
state will cause the framework to begin a resolve process in order to resolve the
bundle. The following methods will start a resolve process in this case:
resolveBundles is called the collection of triggers must include all the current bundle
revisions for bundles passed to resolveBundles which are in the INSTALLED
state.
When FrameworkWiring.refreshBundles(Collection, org.osgi.framework.FrameworkListener...)
is called the collection of triggers is determined with the following steps:
FrameworkWiring.getRemovalPendingBundles()
is called to get the initial collection of bundles.FrameworkWiring.getDependencyClosure(Collection) is called with
the initial collection of bundles to get the dependency closure collection of the bundles being refreshed.As described above, a resolve process is typically initiated as a result of calling API that causes the framework to attempt to resolve one or more bundles. The framework is free to start a resolve process at any time for reasons other than calls to framework API. For example, a resolve process may be used by the framework for diagnostic purposes and result in no bundles actually becoming resolved at the end of the process. Resolver hook implementations must be prepared for resolve processes that are initiated for other reasons besides calls to framework API.
begin in interface ResolverHookFactorytriggers - an unmodifiable collection of bundles which triggered the resolve process.
This collection may be empty if the collection of trigger bundles cannot be
determined.
null value may be returned which indicates this resolver hook factory abstains from
the resolve process.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||