|
Lines 12-19
Link Here
|
| 12 |
package org.eclipse.equinox.internal.region; |
12 |
package org.eclipse.equinox.internal.region; |
| 13 |
|
13 |
|
| 14 |
import java.util.*; |
14 |
import java.util.*; |
|
|
15 |
import org.eclipse.equinox.internal.region.hook.*; |
| 15 |
import org.eclipse.equinox.region.*; |
16 |
import org.eclipse.equinox.region.*; |
| 16 |
import org.osgi.framework.*; |
17 |
import org.osgi.framework.*; |
|
|
18 |
import org.osgi.framework.hooks.bundle.EventHook; |
| 19 |
import org.osgi.framework.hooks.bundle.FindHook; |
| 20 |
import org.osgi.framework.hooks.resolver.ResolverHookFactory; |
| 17 |
|
21 |
|
| 18 |
/** |
22 |
/** |
| 19 |
* {@link StandardRegionDigraph} is the default implementation of {@link RegionDigraph}. |
23 |
* {@link StandardRegionDigraph} is the default implementation of {@link RegionDigraph}. |
|
Lines 45-50
Link Here
|
| 45 |
|
49 |
|
| 46 |
private final SubgraphTraverser subgraphTraverser; |
50 |
private final SubgraphTraverser subgraphTraverser; |
| 47 |
|
51 |
|
|
|
52 |
private final org.osgi.framework.hooks.bundle.EventHook bundleEventHook; |
| 53 |
private final org.osgi.framework.hooks.bundle.FindHook bundleFindHook; |
| 54 |
@SuppressWarnings("deprecation") |
| 55 |
private final org.osgi.framework.hooks.service.EventHook serviceEventHook; |
| 56 |
private final org.osgi.framework.hooks.service.FindHook serviceFindHook; |
| 57 |
private final ResolverHookFactory resolverHookFactory; |
| 58 |
|
| 48 |
StandardRegionDigraph() { |
59 |
StandardRegionDigraph() { |
| 49 |
this(null, null); |
60 |
this(null, null); |
| 50 |
} |
61 |
} |
|
Lines 53-58
Link Here
|
| 53 |
this.subgraphTraverser = new SubgraphTraverser(); |
64 |
this.subgraphTraverser = new SubgraphTraverser(); |
| 54 |
this.bundleContext = bundleContext; |
65 |
this.bundleContext = bundleContext; |
| 55 |
this.threadLocal = threadLocal; |
66 |
this.threadLocal = threadLocal; |
|
|
67 |
|
| 68 |
// Note we are safely escaping this only because we know the hook impls |
| 69 |
// do not escape the digraph to other threads on construction. |
| 70 |
this.resolverHookFactory = new RegionResolverHookFactory(this); |
| 71 |
this.bundleFindHook = new RegionBundleFindHook(this, bundleContext == null ? 0 : bundleContext.getBundle().getBundleId()); |
| 72 |
this.bundleEventHook = new RegionBundleEventHook(this, this.bundleFindHook, this.threadLocal); |
| 73 |
|
| 74 |
this.serviceFindHook = new RegionServiceFindHook(this); |
| 75 |
this.serviceEventHook = new RegionServiceEventHook(serviceFindHook); |
| 56 |
} |
76 |
} |
| 57 |
|
77 |
|
| 58 |
/** |
78 |
/** |
|
Lines 368-371
Link Here
|
| 368 |
} |
388 |
} |
| 369 |
} |
389 |
} |
| 370 |
|
390 |
|
|
|
391 |
@Override |
| 392 |
public ResolverHookFactory getResolverHookFactory() { |
| 393 |
return resolverHookFactory; |
| 394 |
} |
| 395 |
|
| 396 |
@Override |
| 397 |
public EventHook getBundleEventHook() { |
| 398 |
return bundleEventHook; |
| 399 |
} |
| 400 |
|
| 401 |
@Override |
| 402 |
public FindHook getBundleFindHook() { |
| 403 |
return bundleFindHook; |
| 404 |
} |
| 405 |
|
| 406 |
@SuppressWarnings("deprecation") |
| 407 |
@Override |
| 408 |
public org.osgi.framework.hooks.service.EventHook getServiceEventHook() { |
| 409 |
return serviceEventHook; |
| 410 |
} |
| 411 |
|
| 412 |
@Override |
| 413 |
public org.osgi.framework.hooks.service.FindHook getServiceFindHook() { |
| 414 |
return serviceFindHook; |
| 415 |
} |
| 416 |
|
| 371 |
} |
417 |
} |