Class PluginFactory<U extends Plugin>

  • Direct Known Subclasses:
    DecoratedExecutionNodeFactory

    public class PluginFactory<U extends Plugin>
    extends java.lang.Object
    A generic factory for implementations of FaradayCagePlugin.

    Create an instance of this

    • Constructor Summary

      Constructors 
      Constructor Description
      PluginFactory​(java.lang.Class<U> clazz, org.pf4j.PluginManager pluginManager, Resource type)
      Constructor, takes an instance of this FaradayCagePluginFactorys type parameters Class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      U create​(Resource id)
      Create an instance of the FaradayCagePlugin identified by id.
      U getImplementationOf​(Resource type)
      Create an instance of FaradayCagePlugin for a given type.
      java.util.List<Resource> listAvailable()
      List the names of all implementations of T
      • Methods inherited from class java.lang.Object

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

      • PluginFactory

        public PluginFactory​(java.lang.Class<U> clazz,
                             org.pf4j.PluginManager pluginManager,
                             Resource type)
        Constructor, takes an instance of this FaradayCagePluginFactorys type parameters Class.
        Parameters:
        clazz - Class instance for this FaradayCagePluginFactorys type parameter
        pluginManager - the PluginManager to be used in this FaradayCagePluginFactory
        type - Common parent ExecutionNode subtype IRI which all instances producible by this factory share.
    • Method Detail

      • create

        public U create​(Resource id)
        Create an instance of the FaradayCagePlugin identified by id.
        Parameters:
        id - identifier of the instance to create
        Returns:
        instance of the FaradayCagePlugin identified by id.
      • getImplementationOf

        public U getImplementationOf​(Resource type)
        Create an instance of FaradayCagePlugin for a given type.
        Parameters:
        type - type of the instance to create
        Returns:
        instance of the FaradayCagePlugin for the given type.
      • listAvailable

        public final java.util.List<Resource> listAvailable()
        List the names of all implementations of T
        Returns:
        list of names of all implementations of T