Package org.opennms.core.soa.support
Class OnmsOSGiBridgeActivator
- java.lang.Object
-
- org.opennms.core.soa.support.OnmsOSGiBridgeActivator
-
- All Implemented Interfaces:
java.util.EventListener
,RegistrationHook
,org.osgi.framework.BundleActivator
,org.osgi.framework.ServiceListener
public class OnmsOSGiBridgeActivator extends java.lang.Object implements RegistrationHook, org.osgi.framework.ServiceListener, org.osgi.framework.BundleActivator
Bridges opennms services with osgi service registry and vice versa.ServiceRegistry
It does this by listening to registrations from each service and publishing new services in the corresponding registry. OSGI services are only published to the core.soa.ServiceRegistry if they are marked with the 'registration.export' attribute. A 'registration.source' attribute indicating the source of the initial registration (either 'osgi' or 'onms'). This is added to each synchronized service in order to avoid registration looping.- Author:
- brozow
-
-
Constructor Summary
Constructors Constructor Description OnmsOSGiBridgeActivator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
registrationAdded(Registration onmsRegistration)
void
registrationRemoved(Registration onmsRegistration)
void
serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
void
start(org.osgi.framework.BundleContext bundleContext)
void
stop(org.osgi.framework.BundleContext bundleContext)
-
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext bundleContext) throws org.osgi.framework.InvalidSyntaxException
- Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
- Throws:
org.osgi.framework.InvalidSyntaxException
-
stop
public void stop(org.osgi.framework.BundleContext bundleContext)
- Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
-
registrationAdded
public void registrationAdded(Registration onmsRegistration)
- Specified by:
registrationAdded
in interfaceRegistrationHook
-
registrationRemoved
public void registrationRemoved(Registration onmsRegistration)
- Specified by:
registrationRemoved
in interfaceRegistrationHook
-
serviceChanged
public void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
- Specified by:
serviceChanged
in interfaceorg.osgi.framework.ServiceListener
-
-