Class PluginExecutionResultImpl
- java.lang.Object
-
- org.processmining.framework.plugin.impl.PluginExecutionResultImpl
-
- All Implemented Interfaces:
PluginExecutionResult
public class PluginExecutionResultImpl extends java.lang.Object implements PluginExecutionResult
-
-
Constructor Summary
Constructors Constructor Description PluginExecutionResultImpl(java.lang.Class<?>[] returnTypes, java.lang.String[] returnNames, PluginDescriptor plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]getParameters()PluginDescriptorgetPlugin()Returns the plugin used to generate this resultProvidedObjectIDgetProvidedObjectID(int i)Returns the ProvidedObjectID under which the object at index i is known to the framework's ProvidedObject manager<T> TgetResult(int resultIndex)returns the result at the given index, casted to the given returntype.java.lang.StringgetResultName(int resultIndex)this method returns the name of the result at the given index.java.lang.String[]getResultNames()This method returns the names of the resultsjava.lang.Object[]getResults()returns the results of this plugin in an array.intgetSize()Returns the size of this result, i.e.<T> java.lang.Class<? super T>getType(int i)Returns the type of the object at index i, as declared by the pluginvoidsetInput(java.lang.Object[] parameters)voidsetProvidedObjectID(int i, ProvidedObjectID id)Tells this result under which provided object ID the object at index i is known to the frameworkvoidsynchronize()Synchronizes on any futures that might still exist in the result.
-
-
-
Constructor Detail
-
PluginExecutionResultImpl
public PluginExecutionResultImpl(java.lang.Class<?>[] returnTypes, java.lang.String[] returnNames, PluginDescriptor plugin)
-
-
Method Detail
-
getSize
public int getSize()
Description copied from interface:PluginExecutionResultReturns the size of this result, i.e. how many objects were returned by the plugin- Specified by:
getSizein interfacePluginExecutionResult- Returns:
-
getResult
public <T> T getResult(int resultIndex) throws java.lang.ClassCastExceptionDescription copied from interface:PluginExecutionResultreturns the result at the given index, casted to the given returntype. If synchronize() was called, this method returns the actual object. Otherwise, it might return a ProMFutureon the actual object. Note that 0<= resultIndex < getSize() - Specified by:
getResultin interfacePluginExecutionResult- Returns:
- Throws:
java.lang.ClassCastException
-
getResultName
public java.lang.String getResultName(int resultIndex)
Description copied from interface:PluginExecutionResultthis method returns the name of the result at the given index. Note that 0<= resultIndex < getSize()- Specified by:
getResultNamein interfacePluginExecutionResult- Returns:
-
getResultNames
public java.lang.String[] getResultNames()
Description copied from interface:PluginExecutionResultThis method returns the names of the results- Specified by:
getResultNamesin interfacePluginExecutionResult- Returns:
-
getResults
public java.lang.Object[] getResults()
Description copied from interface:PluginExecutionResultreturns the results of this plugin in an array. If synchronize() was called, this method returns the actual objects. Otherwise, it might return ProMFutures on the actual objects (or any combination thereof).- Specified by:
getResultsin interfacePluginExecutionResult- Returns:
-
synchronize
public void synchronize() throws java.util.concurrent.CancellationException, java.util.concurrent.ExecutionException, java.lang.InterruptedExceptionDescription copied from interface:PluginExecutionResultSynchronizes on any futures that might still exist in the result. If no futures exist, this method does terminate normally- Specified by:
synchronizein interfacePluginExecutionResult- Throws:
java.util.concurrent.CancellationExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
setProvidedObjectID
public void setProvidedObjectID(int i, ProvidedObjectID id)Description copied from interface:PluginExecutionResultTells this result under which provided object ID the object at index i is known to the framework- Specified by:
setProvidedObjectIDin interfacePluginExecutionResult- Parameters:
i- index of the objectid- the id of the provided object refering to the objet at index i
-
getProvidedObjectID
public ProvidedObjectID getProvidedObjectID(int i)
Description copied from interface:PluginExecutionResultReturns the ProvidedObjectID under which the object at index i is known to the framework's ProvidedObject manager- Specified by:
getProvidedObjectIDin interfacePluginExecutionResult- Parameters:
i- index of the object
-
setInput
public void setInput(java.lang.Object[] parameters)
-
getParameters
public java.lang.Object[] getParameters()
-
getType
public <T> java.lang.Class<? super T> getType(int i)
Description copied from interface:PluginExecutionResultReturns the type of the object at index i, as declared by the plugin- Specified by:
getTypein interfacePluginExecutionResult- Returns:
-
getPlugin
public PluginDescriptor getPlugin()
Description copied from interface:PluginExecutionResultReturns the plugin used to generate this result- Specified by:
getPluginin interfacePluginExecutionResult- Returns:
-
-