Class AbstractPluginDescriptor
java.lang.Object
org.processmining.framework.plugin.impl.AbstractPluginDescriptor
- All Implemented Interfaces:
Comparable<PluginDescriptor>
,PluginDescriptor
- Direct Known Subclasses:
PluginDescriptorImpl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object[]
execute
(PluginContext context, int methodIndex, Object... allArgs) In this method, the pluginDescriptor should do the actual work of concstructing the result.invoke
(int methodIndex, PluginContext context, 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
-
Constructor Details
-
AbstractPluginDescriptor
public AbstractPluginDescriptor()
-
-
Method Details
-
invoke
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 Object[] execute(PluginContext context, int methodIndex, Object... allArgs) throws 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:
Exception
-