Class DefaultAppPluginRegistry<T extends AppPlugin>

  • All Implemented Interfaces:
    AppPluginRegistry<T>

    public class DefaultAppPluginRegistry<T extends AppPlugin>
    extends java.lang.Object
    implements AppPluginRegistry<T>
    Default implementation of AppPluginRegistry that loads Plugins via the ServiceLoader facilities provided by the Java SE platform.
    Author:
    nico.rehwaldt, Daniel Meyer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​T> pluginsMap  
      protected java.lang.Class<T> pluginType
      the interface type of plugins managed by this registry
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getPlugin​(java.lang.String id)
      Returns the registered plugin with the given name or null if the plugin does not exist.
      java.util.List<T> getPlugins()
      Returns all registered plugins
      protected void loadPlugins()  
      • Methods inherited from class java.lang.Object

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

      • pluginType

        protected final java.lang.Class<T extends AppPlugin> pluginType
        the interface type of plugins managed by this registry
      • pluginsMap

        protected java.util.Map<java.lang.String,​T extends AppPlugin> pluginsMap
    • Constructor Detail

      • DefaultAppPluginRegistry

        public DefaultAppPluginRegistry​(java.lang.Class<T> pluginType)
    • Method Detail

      • loadPlugins

        protected void loadPlugins()
      • getPlugin

        public T getPlugin​(java.lang.String id)
        Description copied from interface: AppPluginRegistry
        Returns the registered plugin with the given name or null if the plugin does not exist.
        Specified by:
        getPlugin in interface AppPluginRegistry<T extends AppPlugin>
        Returns: