Class PluginExecutionResultImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object[] getParameters()  
      PluginDescriptor getPlugin()
      Returns the plugin used to generate this result
      ProvidedObjectID getProvidedObjectID​(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.
      java.lang.String getResultName​(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 results
      java.lang.Object[] getResults()
      returns the results of this plugin in an array.
      int getSize()
      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 plugin
      void setInput​(java.lang.Object[] parameters)  
      void setProvidedObjectID​(int i, ProvidedObjectID id)
      Tells this result under which provided object ID the object at index i is known to the framework
      void synchronize()
      Synchronizes on any futures that might still exist in the result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PluginExecutionResultImpl

        public PluginExecutionResultImpl​(java.lang.Class<?>[] returnTypes,
                                         java.lang.String[] returnNames,
                                         PluginDescriptor plugin)
    • Method Detail

      • getResult

        public <T> T getResult​(int resultIndex)
                        throws java.lang.ClassCastException
        Description copied from interface: PluginExecutionResult
        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()
        Specified by:
        getResult in interface PluginExecutionResult
        Returns:
        Throws:
        java.lang.ClassCastException
      • getResultName

        public java.lang.String getResultName​(int resultIndex)
        Description copied from interface: PluginExecutionResult
        this method returns the name of the result at the given index. Note that 0<= resultIndex < getSize()
        Specified by:
        getResultName in interface PluginExecutionResult
        Returns:
      • getResults

        public java.lang.Object[] getResults()
        Description copied from interface: PluginExecutionResult
        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).
        Specified by:
        getResults in interface PluginExecutionResult
        Returns:
      • synchronize

        public void synchronize()
                         throws java.util.concurrent.CancellationException,
                                java.util.concurrent.ExecutionException,
                                java.lang.InterruptedException
        Description copied from interface: PluginExecutionResult
        Synchronizes on any futures that might still exist in the result. If no futures exist, this method does terminate normally
        Specified by:
        synchronize in interface PluginExecutionResult
        Throws:
        java.util.concurrent.CancellationException
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • setProvidedObjectID

        public void setProvidedObjectID​(int i,
                                        ProvidedObjectID id)
        Description copied from interface: PluginExecutionResult
        Tells this result under which provided object ID the object at index i is known to the framework
        Specified by:
        setProvidedObjectID in interface PluginExecutionResult
        Parameters:
        i - index of the object
        id - the id of the provided object refering to the objet at index i
      • 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: PluginExecutionResult
        Returns the type of the object at index i, as declared by the plugin
        Specified by:
        getType in interface PluginExecutionResult
        Returns: