Class AbstractPluginDescriptor
- java.lang.Object
-
- org.processmining.framework.plugin.impl.AbstractPluginDescriptor
-
- All Implemented Interfaces:
java.lang.Comparable<PluginDescriptor>
,PluginDescriptor
- Direct Known Subclasses:
PluginDescriptorImpl
public abstract class AbstractPluginDescriptor extends java.lang.Object implements PluginDescriptor
-
-
Constructor Summary
Constructors Constructor Description AbstractPluginDescriptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Object[]
execute(PluginContext context, int methodIndex, java.lang.Object... allArgs)
In this method, the pluginDescriptor should do the actual work of concstructing the result.PluginExecutionResult
invoke(int methodIndex, PluginContext context, java.lang.Object... args)
Asynchronously invokes a method of this plugin.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.framework.plugin.PluginDescriptor
compareTo, equals, getAnnotation, getAnnotation, getCategories, getContextType, getHelp, getIcon, getID, getIndexInMethod, getIndexInParameterNames, getKeywords, getMethodHelp, getMethodLabel, getMostSignificantResult, getName, getNumberOfMethods, getPackage, getParameterNames, getParameterNames, getParameterTypes, getParameterTypes, getPluginParameterName, getPluginParameterType, getReturnNames, getReturnTypes, getTypesAtParameterIndex, getURL, handlesCancel, hasAnnotation, hasAnnotation, hashCode, isUserAccessible, meetsLevelThreshold, meetsQualityThreshold, toString
-
-
-
-
Method Detail
-
invoke
public PluginExecutionResult invoke(int methodIndex, PluginContext context, java.lang.Object... args)
Description copied from interface:PluginDescriptor
Asynchronously invokes a method of this plugin. The methodIndex should refer to an existing method, i.e. 0 <= methodindex < getNumberOfMethods(); Note that the callers of this plugin should notify the lifeCycleListners of the given context of the creation of this plugin, i.e. they should call:context.getParentContext().getPluginLifeCycleEventListeners().firePluginCreated(context);
- Specified by:
invoke
in interfacePluginDescriptor
- Parameters:
methodIndex
- The index of the method to be invokedcontext
- the context in which this plugin should be invoked. The plugin may assume that this context is meant only for its execution.args
- the objects to be passed to the plugin. These objects should be in the right order. However, ifProMFuture
objects are provided, the plugin will synchronize on them. This syncrhonization is performed in a fast-fail fashion, i.e. the first future that results in an exception during execution will result in an exception while invoking this plugin. This exception is caught and the context is signaled about it.- Returns:
- a PluginExecutionResult holding pointers to the future outcome of this invokation. If synchrounous execution is required, the calling method should synchronize on this result
-
execute
protected abstract java.lang.Object[] execute(PluginContext context, int methodIndex, java.lang.Object... allArgs) throws java.lang.Exception
In this method, the pluginDescriptor should do the actual work of concstructing the result. Note that no objects passed in the allArgs argument are futures anymore.- Parameters:
context
-methodIndex
-allArgs
-- Returns:
- Throws:
java.lang.Exception
-
-