Class Activator

  • All Implemented Interfaces:
    org.osgi.framework.BundleActivator, org.osgi.service.url.URLStreamHandlerService

    public class Activator
    extends org.osgi.service.url.AbstractURLStreamHandlerService
    implements org.osgi.framework.BundleActivator
    Bundle activator for protocol handlers.
    • Field Summary

      • Fields inherited from class org.osgi.service.url.AbstractURLStreamHandlerService

        realHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      Activator()  
    • Constructor Detail

      • Activator

        public Activator()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext bundleContext)
        Registers Handler as a wrap: protocol stream handler service and as a configuration managed service if possible.
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        Parameters:
        bundleContext - the bundle context.
        See Also:
        BundleActivator.start(org.osgi.framework.BundleContext)
      • stop

        public void stop​(org.osgi.framework.BundleContext bundleContext)
        Performs cleanup:
        * Unregister handler;
        * Unregister managed service;
        * Release bundle context.
        Specified by:
        stop in interface org.osgi.framework.BundleActivator
        See Also:
        BundleActivator.stop(org.osgi.framework.BundleContext)
      • openConnection

        public URLConnection openConnection​(URL url)
                                     throws IOException
        Specified by:
        openConnection in interface org.osgi.service.url.URLStreamHandlerService
        Specified by:
        openConnection in class org.osgi.service.url.AbstractURLStreamHandlerService
        Throws:
        IOException