uk.ac.imperial.ph.hep.command
Class DaqCommand

java.lang.Object
  extended by uk.ac.imperial.ph.hep.command.DaqCommand
Direct Known Subclasses:
DaqLogCmd, DaqStartRunCmd, DaqStateChangeCmd

public abstract class DaqCommand
extends java.lang.Object

Author:
Jamie Ballin, HEP, Imperial College London

Constructor Summary
DaqCommand()
           
 
Method Summary
abstract  void execute()
          Implementations do whatever it is they do here.
abstract  java.lang.String getDescription()
          Implementations should specify what it is they're doing with this string.
abstract  boolean isRunning()
           
protected  void notifyListeners(java.lang.String daqOutput)
          Daq commands can call this when they have some output.
 void registerListener(DaqCmdListener dcl)
          Parties interested in the output of these commands should register listeners here.
abstract  void terminate()
          Implementations should cease execution.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DaqCommand

public DaqCommand()
Method Detail

execute

public abstract void execute()
Implementations do whatever it is they do here. This is asynchronous. It will not block.


terminate

public abstract void terminate()
Implementations should cease execution.


getDescription

public abstract java.lang.String getDescription()
Implementations should specify what it is they're doing with this string.

Returns:
A short description

registerListener

public void registerListener(DaqCmdListener dcl)
Parties interested in the output of these commands should register listeners here.

Parameters:
dcl -

isRunning

public abstract boolean isRunning()

notifyListeners

protected void notifyListeners(java.lang.String daqOutput)
Daq commands can call this when they have some output. Registered listeners will be called.

Parameters:
daqOutput -

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object