nz.ac.waikato.mcennis.rat.scheduler
Class BasicScheduler

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.model.ModelShell
      extended by nz.ac.waikato.mcennis.rat.scheduler.BasicScheduler
All Implemented Interfaces:
Listener, Model, ParsedObject, Scheduler

public class BasicScheduler
extends ModelShell
implements Scheduler, Listener

Stripped down scheduler that directly executes each component without performing any sanity checks on the input.


Field Summary
 
Fields inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell
listener
 
Fields inherited from interface nz.ac.waikato.mcennis.rat.scheduler.Scheduler
ALGORITHM_DONE, DONE, INITIALIZE, SET_ALGORITHM, SET_ALGORITHM_COUNT, SET_ALGORITHM_PROGRESS, SET_GRAPH_COUNT, SET_GRAPH_PROGRESS, START
 
Constructor Summary
BasicScheduler()
          Creates a new instance of BasicScheduler
 
Method Summary
 void cancel()
          FIXME: Not yet implemented.
 Graph get()
          Return the graph produced and altered by the data aquisition and algorithms.
 Parameter[] getParameters()
          Return a machine-readable description of the parameters this scheduler has.
 void init(java.util.Properties props)
          FIXME: Not yet implemented
 void load(Algorithm algorithms, java.util.regex.Pattern pattern)
          set an algorithm to be executed.
 void load(DataAquisition loader)
          set the data-aquisition component to be executed
 void load(java.io.InputStream config)
          FIXME: Not yet implemented.
 void publishChange(Model m, int type, int argument)
          Recieve and update of the given type.
 void set(Graph g)
          Set the graph that will serve as the data structure to be executed against
 void start()
          Begin execution
 
Methods inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell
addListener, fireChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nz.ac.waikato.mcennis.rat.graph.model.Model
addListener
 

Constructor Detail

BasicScheduler

public BasicScheduler()
Creates a new instance of BasicScheduler

Method Detail

load

public void load(DataAquisition loader)
Description copied from interface: Scheduler
set the data-aquisition component to be executed

Specified by:
load in interface Scheduler
Parameters:
loader - acquisition method.

load

public void load(Algorithm algorithms,
                 java.util.regex.Pattern pattern)
Description copied from interface: Scheduler
set an algorithm to be executed.

Specified by:
load in interface Scheduler
Parameters:
algorithms - array of algorithms to execute against the graph

set

public void set(Graph g)
Description copied from interface: Scheduler
Set the graph that will serve as the data structure to be executed against

Specified by:
set in interface Scheduler
Parameters:
g - graph that will be the data structure

get

public Graph get()
Description copied from interface: Scheduler
Return the graph produced and altered by the data aquisition and algorithms.

Specified by:
get in interface Scheduler
Returns:
graph associated with this scheduler

load

public void load(java.io.InputStream config)
          throws java.io.IOException,
                 java.lang.Exception
FIXME: Not yet implemented.

Specified by:
load in interface Scheduler
Throws:
java.io.IOException
java.lang.Exception

start

public void start()
Description copied from interface: Scheduler
Begin execution

Specified by:
start in interface Scheduler

cancel

public void cancel()
FIXME: Not yet implemented.

Specified by:
cancel in interface Scheduler

init

public void init(java.util.Properties props)
FIXME: Not yet implemented

Specified by:
init in interface Scheduler

getParameters

public Parameter[] getParameters()
Description copied from interface: Scheduler
Return a machine-readable description of the parameters this scheduler has.

Specified by:
getParameters in interface Scheduler
Returns:
parameters for this scheduler.

publishChange

public void publishChange(Model m,
                          int type,
                          int argument)
Description copied from interface: Listener
Recieve and update of the given type.

Specified by:
publishChange in interface Listener
Parameters:
m - model that changed
type - type of change that has occured