Class OnmsOSGiBridgeActivator

  • All Implemented Interfaces:
    EventListener, RegistrationHook, org.osgi.framework.BundleActivator, org.osgi.framework.ServiceListener

    public class OnmsOSGiBridgeActivator
    extends 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 Detail

      • OnmsOSGiBridgeActivator

        public OnmsOSGiBridgeActivator()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext bundleContext)
                   throws org.osgi.framework.InvalidSyntaxException
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        Throws:
        org.osgi.framework.InvalidSyntaxException
      • stop

        public void stop​(org.osgi.framework.BundleContext bundleContext)
        Specified by:
        stop in interface org.osgi.framework.BundleActivator
      • serviceChanged

        public void serviceChanged​(org.osgi.framework.ServiceEvent serviceEvent)
        Specified by:
        serviceChanged in interface org.osgi.framework.ServiceListener