org.springframework.osgi.context.event
Class OsgiBundleApplicationContextEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.springframework.context.ApplicationEvent
          extended by org.springframework.context.event.ApplicationContextEvent
              extended by org.springframework.osgi.context.event.OsgiBundleApplicationContextEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BootstrappingDependencyEvent, OsgiBundleContextClosedEvent, OsgiBundleContextFailedEvent, OsgiBundleContextRefreshedEvent

public abstract class OsgiBundleApplicationContextEvent
extends ApplicationContextEvent

Base class for events raised for an ApplicationContext created inside an OSGi environment. Normally, events of this type are raised by the OSGi extender to notify 3rd parties, external to the context, about changes in the life cycle of the application context.

Note:While the context source is likely to be an implementation of ConfigurableOsgiBundleApplicationContext, this is not mandatory (it's entirely possible to have a non-OSGi aware ApplicationContext implementation).

Author:
Costin Leau
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
OsgiBundleApplicationContextEvent(ApplicationContext source, Bundle bundle)
          Constructs a new OsgiApplicationContextEvent instance.
 
Method Summary
 Bundle getBundle()
          Returns the OSGi Bundle associated with the application context that triggers the event.
 
Methods inherited from class org.springframework.context.event.ApplicationContextEvent
getApplicationContext
 
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OsgiBundleApplicationContextEvent

public OsgiBundleApplicationContextEvent(ApplicationContext source,
                                         Bundle bundle)
Constructs a new OsgiApplicationContextEvent instance.

Parameters:
source - the ConfigurableOsgiBundleApplicationContext that the event is raised for (must not be null)
Method Detail

getBundle

public Bundle getBundle()
Returns the OSGi Bundle associated with the application context that triggers the event.

Returns:
associated OSGi bundle


Copyright © 2006-2009 Spring Framework. All Rights Reserved.