Class PluginImpl

  • All Implemented Interfaces:
    org.osgi.service.event.EventHandler, Plugin

    public class PluginImpl
    extends Object
    implements Plugin, org.osgi.service.event.EventHandler
    • Constructor Detail

    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • publishFileSystem

        public void publishFileSystem​(String uriNamespace,
                                      String path)
        Publishes a directory of the server's file system.
        Parameters:
        path - An absolute path to the directory to be published.
      • getUri

        public String getUri()
      • getStaticResource

        public InputStream getStaticResource​(String name)
        Description copied from interface: Plugin
        Accesses a static resource of the plugin. A static resource is some data (images, audio, text, etc) that is contained in the plugin bundle (that is the jar file).
        Specified by:
        getStaticResource in interface Plugin
        Parameters:
        name - The resource name: a "/"-separated path name, relative to the plugin bundle's root directory. It may or may not begin with "/" (it makes no difference).
        Returns:
        An InputStream to read the static resource content.
      • hasStaticResource

        public boolean hasStaticResource​(String name)
        Description copied from interface: Plugin
        Checks if this plugin bundle contains a static resource with the given name.
        Specified by:
        hasStaticResource in interface Plugin
        Parameters:
        name - The resource name: a "/"-separated path name, relative to the plugin bundle's root directory. It may or may not begin with "/" (it makes no difference).
      • handleEvent

        public void handleEvent​(org.osgi.service.event.Event event)
        Specified by:
        handleEvent in interface org.osgi.service.event.EventHandler