Interface PluginExecutionResult
- All Known Implementing Classes:
PluginExecutionResultImpl
public interface PluginExecutionResult
This class represents the result of a plugin execution. It can be used to
obtain all details after executing a plugin.
Typically, plugins are executed a-synchronously, but by calling synchronize()
on this object, the current thread is suspended untill all results are in (or
exceptions are thrown)
- Author:
- bfvdonge
-
Method Summary
Modifier and TypeMethodDescriptionReturns the plugin used to generate this resultgetProvidedObjectID
(int i) Returns the ProvidedObjectID under which the object at index i is known to the framework's ProvidedObject manager<T> T
getResult
(int resultIndex) returns the result at the given index, casted to the given returntype.getResultName
(int resultIndex) this method returns the name of the result at the given index.String[]
This method returns the names of the resultsObject[]
returns the results of this plugin in an array.int
getSize()
Returns the size of this result, i.e.<T> Class<? super T>
getType
(int i) Returns the type of the object at index i, as declared by the pluginvoid
setProvidedObjectID
(int i, ProvidedObjectID id) Tells this result under which provided object ID the object at index i is known to the frameworkvoid
Synchronizes on any futures that might still exist in the result.
-
Method Details
-
getSize
int getSize()Returns the size of this result, i.e. how many objects were returned by the plugin- Returns:
-
synchronize
Synchronizes on any futures that might still exist in the result. If no futures exist, this method does terminate normally -
getResults
Object[] getResults()returns 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).- Returns:
-
getResult
returns 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() - Type Parameters:
T
-- Parameters:
resultIndex
-- Returns:
- Throws:
ClassCastException
-
getResultNames
String[] getResultNames()This method returns the names of the results- Returns:
-
getResultName
this method returns the name of the result at the given index. Note that 0<= resultIndex < getSize()- Parameters:
resultIndex
-- Returns:
-
setProvidedObjectID
Tells this result under which provided object ID the object at index i is known to the framework- Parameters:
i
- index of the objectid
- the id of the provided object refering to the objet at index i
-
getProvidedObjectID
Returns the ProvidedObjectID under which the object at index i is known to the framework's ProvidedObject manager- Parameters:
i
- index of the object
-
getType
Returns the type of the object at index i, as declared by the plugin- Parameters:
i
-- Returns:
-
getPlugin
PluginDescriptor getPlugin()Returns the plugin used to generate this result- Returns:
-