Package org.aksw.faraday_cage.engine
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 ofFaradayCagePlugin.Create an instance of this
-
-
Constructor Summary
Constructors Constructor Description PluginFactory(Class<U> clazz, org.pf4j.PluginManager pluginManager, Resource type)Constructor, takes an instance of thisFaradayCagePluginFactorys type parametersClass.
-
Method Summary
Modifier and Type Method Description Ucreate(Resource id)Create an instance of theFaradayCagePluginidentified byid.UgetImplementationOf(Resource type)Create an instance ofFaradayCagePluginfor a giventype.List<Resource>listAvailable()List the names of all implementations ofT
-
-
-
Constructor Detail
-
PluginFactory
public PluginFactory(Class<U> clazz, org.pf4j.PluginManager pluginManager, Resource type)
Constructor, takes an instance of thisFaradayCagePluginFactorys type parametersClass.- Parameters:
clazz-Classinstance for thisFaradayCagePluginFactorys type parameterpluginManager- thePluginManagerto be used in thisFaradayCagePluginFactorytype- 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 theFaradayCagePluginidentified byid.- Parameters:
id- identifier of the instance to create- Returns:
- instance of the
FaradayCagePluginidentified byid.
-
getImplementationOf
public U getImplementationOf(Resource type)
Create an instance ofFaradayCagePluginfor a giventype.- Parameters:
type- type of the instance to create- Returns:
- instance of the
FaradayCagePluginfor the giventype.
-
-