Class SpringLoaderPlugin


  • @Alpha
    public abstract class SpringLoaderPlugin
    extends PrivilegedSpringPlugin
    Allows a plugin to scan packages for beans and load Spring Configurations.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.context.annotation.AnnotationConfigApplicationContext pluginContext  
      • Fields inherited from class org.pf4j.Plugin

        log, wrapper
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringLoaderPlugin​(org.pf4j.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
      java.util.List<java.lang.Class> getClassesToRegister()
      Specify plugin classes to register with the plugin context.
      java.util.List<java.lang.String> getPackagesToScan()
      Specify plugin packages to scan for beans.
      void registerBeanDefinitions​(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Provides the opportunity to register bean definitions from the plugin into the application's registry.
      • Methods inherited from class org.pf4j.Plugin

        delete, getWrapper, start, stop
      • Methods inherited from class java.lang.Object

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

      • pluginContext

        protected org.springframework.context.annotation.AnnotationConfigApplicationContext pluginContext
    • Constructor Detail

      • SpringLoaderPlugin

        public SpringLoaderPlugin​(org.pf4j.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.
        Parameters:
        wrapper -
    • Method Detail

      • registerBeanDefinitions

        public void registerBeanDefinitions​(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
        Description copied from class: PrivilegedSpringPlugin
        Provides the opportunity to register bean definitions from the plugin into the application's registry.
        Specified by:
        registerBeanDefinitions in class PrivilegedSpringPlugin
      • getPackagesToScan

        public java.util.List<java.lang.String> getPackagesToScan()
        Specify plugin packages to scan for beans.
      • getClassesToRegister

        public java.util.List<java.lang.Class> getClassesToRegister()
        Specify plugin classes to register with the plugin context.