Class PluginFactory<U extends Plugin>

java.lang.Object
org.aksw.faraday_cage.engine.PluginFactory<U>
Direct Known Subclasses:
DecoratedExecutionNodeFactory

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

Create an instance of this

  • Constructor Details

    • PluginFactory

      public PluginFactory(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 Details

    • 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 List<Resource> listAvailable()
      List the names of all implementations of T
      Returns:
      list of names of all implementations of T