1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.osgi.extender.event;
18
19 import org.osgi.framework.Bundle;
20 import org.springframework.context.ApplicationContext;
21 import org.springframework.osgi.context.event.OsgiBundleApplicationContextEvent;
22 import org.springframework.osgi.service.importer.event.OsgiServiceDependencyEvent;
23 import org.springframework.util.Assert;
24
25 /**
26 * Spring-DM Extender bootstrapping event. This event is used during the
27 * application context discovery phase, before an application context is fully
28 * initialized.
29 *
30 * <p/> It can be used to receive status updates for contexts started by the
31 * extender.
32 *
33 * @author Costin Leau
34 *
35 */
36 public class BootstrappingDependencyEvent extends OsgiBundleApplicationContextEvent {
37
38 private final OsgiServiceDependencyEvent dependencyEvent;
39
40
41 /**
42 * Constructs a new <code>BootstrappingDependencyEvent</code> instance.
43 *
44 * @param source
45 */
46 public BootstrappingDependencyEvent(ApplicationContext source, Bundle bundle, OsgiServiceDependencyEvent nestedEvent) {
47 super(source, bundle);
48 Assert.notNull(nestedEvent);
49 this.dependencyEvent = nestedEvent;
50 }
51
52 /**
53 * Returns the nested, dependency event that caused the bootstrapping event
54 * to be raised.
55 *
56 * @return associated dependency event
57 */
58 public OsgiServiceDependencyEvent getDependencyEvent() {
59 return dependencyEvent;
60 }
61 }