Class AbstractPluginDescriptor

java.lang.Object
org.processmining.framework.plugin.impl.AbstractPluginDescriptor
All Implemented Interfaces:
Comparable<PluginDescriptor>, PluginDescriptor
Direct Known Subclasses:
PluginDescriptorImpl

public abstract class AbstractPluginDescriptor extends Object implements PluginDescriptor
  • Constructor Details

    • AbstractPluginDescriptor

      public AbstractPluginDescriptor()
  • Method Details

    • invoke

      public PluginExecutionResult invoke(int methodIndex, PluginContext context, 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 interface PluginDescriptor
      Parameters:
      methodIndex - The index of the method to be invoked
      context - 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, if ProMFuture 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