Class BundleEventAdapter
- java.lang.Object
-
- org.apache.felix.eventadmin.impl.adapter.AbstractAdapter
-
- org.apache.felix.eventadmin.impl.adapter.BundleEventAdapter
-
- All Implemented Interfaces:
EventListener,org.osgi.framework.BundleListener
public class BundleEventAdapter extends AbstractAdapter implements org.osgi.framework.BundleListener
This class registers itself as a listener for bundle events and posts them via the EventAdmin as specified in 113.6.4 OSGi R4 compendium.- Author:
- Felix Project Team
-
-
Constructor Summary
Constructors Constructor Description BundleEventAdapter(org.osgi.framework.BundleContext context, org.osgi.service.event.EventAdmin admin)The constructor of the adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbundleChanged(org.osgi.framework.BundleEvent event)Once a bundle event is received this method assembles and posts an event via theEventAdminas specified in 113.6.4 OSGi R4 compendium.voiddestroy(org.osgi.framework.BundleContext context)-
Methods inherited from class org.apache.felix.eventadmin.impl.adapter.AbstractAdapter
getEventAdmin
-
-
-
-
Constructor Detail
-
BundleEventAdapter
public BundleEventAdapter(org.osgi.framework.BundleContext context, org.osgi.service.event.EventAdmin admin)The constructor of the adapter. This will register the adapter with the given context as aBundleListenerand subsequently, will post received events via the given EventAdmin.- Parameters:
context- The bundle context with which to register as a listener.admin- TheEventAdminto use for posting events.
-
-
Method Detail
-
destroy
public void destroy(org.osgi.framework.BundleContext context)
- Specified by:
destroyin classAbstractAdapter
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
Once a bundle event is received this method assembles and posts an event via theEventAdminas specified in 113.6.4 OSGi R4 compendium.- Specified by:
bundleChangedin interfaceorg.osgi.framework.BundleListener- Parameters:
event- The event to adapt.
-
-