use of org.opennms.osgi.EventRegistry in project opennms by OpenNMS.
the class Activator method autoExportDefaultServices.
private void autoExportDefaultServices(BundleContext bundleContext) {
final long bundleId = bundleContext.getBundle().getBundleId();
Log.info("Auto export of default Services for bundle (id: {}) enabled", bundleId);
final OnmsServiceManager serviceManager = new OnmsServiceManagerImpl(bundleContext);
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("bundleId", bundleContext.getBundle().getBundleId());
Log.info("Registering OnmsServiceManager and SessionListener for bundle (id: {})", bundleId);
bundleContext.registerService(new String[] { OnmsServiceManager.class.getName(), SessionListener.class.getName() }, serviceManager, props);
Log.info("Registering EventRegistry for bundle (id: {})", bundleId);
bundleContext.registerService(EventRegistry.class.getName(), new EventRegistry(bundleContext), props);
}
Aggregations