cz.cuni.pogamut.experiments
Class ExperimentsUTServer

java.lang.Object
  extended by cz.cuni.pogamut.experiments.ExperimentExecutor
      extended by cz.cuni.pogamut.experiments.SerialExperimentExecutor
          extended by cz.cuni.pogamut.experiments.ExperimentsUTServer

public class ExperimentsUTServer
extends SerialExperimentExecutor

Wrapper for UT Server that adds functionality for running Experiments.


Field Summary
protected  Experiment actualExperiment
          Experiment being run on the server.
protected  FlagListener<ExperimentExecutionState> experimentListener
           
protected  UTServer server
          Server being wrapped.
 
Constructor Summary
protected ExperimentsUTServer(UTServer server)
          Creates a new instance of ExperimentsUTServer
 
Method Summary
static ExperimentsUTServer create(UTServer server)
          Creates ExperimentsUTServer for given server.
 LocalExperimentHandle execute(ExperimentDescriptor experimentDescriptor)
          Executes experiment on UTServer.
 Experiment getActualExperiment()
           
 UTServer getServer()
           
protected  boolean isActualExperimentRunning()
           
protected  void removeExperiment()
          Clears all variables connected to finished experiment.
 
Methods inherited from class cz.cuni.pogamut.experiments.SerialExperimentExecutor
execute
 
Methods inherited from class cz.cuni.pogamut.experiments.ExperimentExecutor
close, waitForAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

protected UTServer server
Server being wrapped.


actualExperiment

protected Experiment actualExperiment
Experiment being run on the server.


experimentListener

protected FlagListener<ExperimentExecutionState> experimentListener
Constructor Detail

ExperimentsUTServer

protected ExperimentsUTServer(UTServer server)
Creates a new instance of ExperimentsUTServer

Method Detail

create

public static ExperimentsUTServer create(UTServer server)
Creates ExperimentsUTServer for given server. TODO should use pooling in the future.


isActualExperimentRunning

protected boolean isActualExperimentRunning()

execute

public LocalExperimentHandle execute(ExperimentDescriptor experimentDescriptor)
                              throws ExecutorException
Executes experiment on UTServer. This method is nonblocking, result of the experiment can be obtained from ExperimentHandle.

Overrides:
execute in class ExperimentExecutor
Returns:
Handle for executing experiment.
Throws:
ExecutorException

removeExperiment

protected void removeExperiment()
Clears all variables connected to finished experiment.


getActualExperiment

public Experiment getActualExperiment()

getServer

public UTServer getServer()