Package org.pf4j

Class Plugin


  • public class Plugin
    extends java.lang.Object
    This class will be extended by all plugins and serve as the common class between a plugin and the application.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.slf4j.Logger log
      Makes logging service available for descending classes.
      protected PluginWrapper wrapper
      Wrapper of the plugin.
    • Constructor Summary

      Constructors 
      Constructor Description
      Plugin​(PluginWrapper wrapper)
      Constructor to be used by plugin manager for plugin instantiation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      This method is called by the application when the plugin is deleted.
      PluginWrapper getWrapper()
      Retrieves the wrapper of this plug-in.
      void start()
      This method is called by the application when the plugin is started.
      void stop()
      This method is called by the application when the plugin is stopped.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected final org.slf4j.Logger log
        Makes logging service available for descending classes.
      • wrapper

        protected PluginWrapper wrapper
        Wrapper of the plugin.
    • Constructor Detail

      • Plugin

        public Plugin​(PluginWrapper wrapper)
        Constructor to be used by plugin manager for plugin instantiation. Your plugins have to provide constructor with this exact signature to be successfully loaded by manager.