cz.cuni.pogamut.experiments
Interface ExperimentHandle

All Known Subinterfaces:
LocalExperimentHandle
All Known Implementing Classes:
AbstractExperimentHandle, BasicExperiment, Experiment

public interface ExperimentHandle

Handle for experiment being currently executed or for finished experiment. Listeners for experiment progress can be registered on this handle. Results of the experiment can be also obtained from this class.


Method Summary
 java.lang.Exception getException()
          Blocking method returning exception that may have been raised during execution of the experiment.
 Flag<ExperimentExecutionState> getExperimentExecutionFlag()
           
 java.lang.String getName()
          Name of the experiment.
 ExperimentResult getResult()
          Blocking method returning results of the experiment.
 void stop()
          Aborts execution of the experiment.
 

Method Detail

getResult

ExperimentResult getResult()
                           throws java.lang.Exception
Blocking method returning results of the experiment. Before getting the results check the getException() method.

Throws:
java.lang.Exception - exception that may have been raised during execution of the experiment

getException

java.lang.Exception getException()
Blocking method returning exception that may have been raised during execution of the experiment. It is advised to check this method before getting the results from getResult() method.

Returns:
null if no exception was thrown

stop

void stop()
Aborts execution of the experiment.


getExperimentExecutionFlag

Flag<ExperimentExecutionState> getExperimentExecutionFlag()
Returns:
Flag with execution state of experiment.

getName

java.lang.String getName()
Name of the experiment.