stella
Interface Sequencing<E>

All Superinterfaces:
CancelRunnable, ClusterDepending, PropertySupplying, ReplySubscriber, Runnable
All Known Implementing Classes:
AbstractSequencer, DummySequencer, LoopingSequencer, SimulatorSequencer, XMLSequencer

public interface Sequencing<E>
extends CancelRunnable, PropertySupplying, ReplySubscriber, ClusterDepending

The interface defining sequencing capabilities. Concrete classes are able to successfully conduct a single target sequence, starting from moving the telescope to taking a CCD-readout. Although a sequence is a thread, not more than a single target sequence should be active at any given time.


Field Summary
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Method Summary
 void abort(List<E> dom)
          Aborts the sequence and replaces the unfinished steps with an alternative sequence while running.
 void append(List<E> dom)
          Adds the sequencer steps found in the specified file, noramlly a DOMSequence DOM, while running.
 List<E> getStepsForTarget(TargetDefinition target)
          Converts a target into a list of sequence steps.
 boolean isCancel()
          Returns true if the sequencer was canceled from the outside.
 void load(List<E> dom)
          Loads a sequencing list.
 void prepend(List<E> dom)
          Adds the sequencer steps found in the argument to the start of the remaining sequence.
 void registerLauncher(CommandLaunching[] launch)
          Registers the CommandLaunching instances used by this Sequencing implementation for connecting to command servers.
 void registerRender(CommandRendering chef)
          Registers the master mind controler to this Sequencing implementation for lookback-calls.
 Thread start()
          Starts a sequencer after a sequence has been loaded.
 
Methods inherited from interface util.CancelRunnable
cancel, getAsociatedThread, maxTimeToCancel
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface stella.ReplySubscriber
forward
 
Methods inherited from interface stella.ClusterDepending
registerCluster
 

Method Detail

getStepsForTarget

List<E> getStepsForTarget(TargetDefinition target)
Converts a target into a list of sequence steps. The key property may be a string returned by a call to the TargetDefinition.getType() method. The sequencer must know how this property is converted into a list of sequencing steps. A XMLSequencer uses xml-files for this purpose.


load

void load(List<E> dom)
Loads a sequencing list. The list will normally be an DOMSequence DOM xml-file. This method must be called prior to the thread's start method otherwise an IllegalThreadStateException is thrown.


abort

void abort(List<E> dom)
Aborts the sequence and replaces the unfinished steps with an alternative sequence while running. This is the error-handling capability of the sequencer. If an error occurs the normal sequence is broken and an error-recovering or error-treating sequence is loaded from a sequence file, normally a DOMSequence DOM.


append

void append(List<E> dom)
Adds the sequencer steps found in the specified file, noramlly a DOMSequence DOM, while running.


prepend

void prepend(List<E> dom)
Adds the sequencer steps found in the argument to the start of the remaining sequence.


registerRender

void registerRender(CommandRendering chef)
Registers the master mind controler to this Sequencing implementation for lookback-calls. This method must be called prior to the thread's start method otherwise an IllegalThreadStateException is thrown.


registerLauncher

void registerLauncher(CommandLaunching[] launch)
Registers the CommandLaunching instances used by this Sequencing implementation for connecting to command servers. This method must be called prior to the thread's start method otherwise an IllegalThreadStateException is thrown.


start

Thread start()
Starts a sequencer after a sequence has been loaded. This method allows the Runnable sequencer to get a link to the thread it runs in rather than letting the outside world construct and start the sequencer thread.

Returns:
The thread that has just been started

isCancel

boolean isCancel()
Returns true if the sequencer was canceled from the outside.