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 Type
    Method
    Description
    Returns the plugin used to generate this result
    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.
    This method returns the names of the results
    returns the results of this plugin in an array.
    int
    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 plugin
    void
    Tells this result under which provided object ID the object at index i is known to the framework
    void
    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
      Throws:
      CancellationException
      ExecutionException
      InterruptedException
    • 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

      <T> T getResult(int resultIndex) throws ClassCastException
      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 ProMFuture on 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

      String getResultName(int resultIndex)
      this method returns the name of the result at the given index. Note that 0<= resultIndex < getSize()
      Parameters:
      resultIndex -
      Returns:
    • setProvidedObjectID

      void setProvidedObjectID(int i, ProvidedObjectID id)
      Tells this result under which provided object ID the object at index i is known to the framework
      Parameters:
      i - index of the object
      id - the id of the provided object refering to the objet at index i
    • getProvidedObjectID

      ProvidedObjectID getProvidedObjectID(int i)
      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

      <T> Class<? super T> getType(int i)
      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: