stella.command
Class SimpleCommand

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
          extended by stella.MessageEvent
              extended by stella.CommandEvent
                  extended by stella.command.SimpleCommand
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbortAdapter, AbortAuxiliary, AbortCalibration, AbortCcd, AbortEnvironment, AbortExposeAdapter, AbortSpectrograph, AbortTelescope, AntiSun, AutoFaintFocusAdapter, AutoFocusAdapter, BiasCcd, CalibrationOffAdapter, CalibrationOnAdapter, CloseCoverTelescope, CloseHatchRoof, CloseLeftRoof, CloseRightRoof, CloseRoof, CloseSlitRoof, CloseSocket, ContinueWatchMaster, DisableAutoClearingCcd, EnableAutoClearingCcd, FlatFieldOffAdapter, FlatFieldOffCalibration, FlatFieldOnAdapter, FlatFieldOnCalibration, HaltWatchMaster, HomeRoof, InitAdapter, InitAuxiliary, InitCalibration, InitCcd, InitEnvironment, InitSpectrograph, InitTelescope, JSimpleCommand, MoveCalibrationAdapter, MoveFlatFieldAdapter, MoveFlatFieldCalibration, MoveHomeAdapter, MoveHomeCalibration, MoveThArCalibration, OpenHatchRoof, OpenLeftRoof, OpenRightRoof, OpenRoof, OpenSlitRoof, ParkAdapter, ParkAuxiliary, ParkCalibration, ParkCcd, ParkEnvironment, ParkMaster, ParkSpectrograph, ParkTelescope, PointingModelRequest, PointingPositionTelescope, PowerOffRoof, PowerOnRoof, ProtectTelescope, QuitAdapter, QuitAuxiliary, QuitCalibration, QuitCcd, QuitEnvironment, QuitMaster, QuitSpectrograph, QuitTelescope, ResetAdapter, ResetAuxiliary, ResetCalibration, ResetCcd, ResetEnvironment, ResetErrorsTelescope, ResetLimitSwitch, ResetSpectrograph, ResetTelescope, StartGrabMaster, StartGuideTelescope, StartGuidingTelescope, StartTilingAdapter, StartTilingAuxiliary, StartTrackingTelescope, StatusAdapter, StatusAuxiliary, StatusCcd, StatusEnvironment, StatusSpectrograph, StatusTelescope, StopExposingAuxiliary, StopGrabMaster, StopGuideTelescope, StopGuidingAdapter, StopGuidingAuxiliary, StopGuidingTelescope, StopRoof, StopTilingAdapter, StopTilingAuxiliary, StopTrackingTelescope, StopWatchMaster, ThArOffCalibration, ThArOnCalibration

public class SimpleCommand
extends CommandEvent

A helper class providing default implementation of the parseLine(java.lang.String[]) and getLine() method of the base CommandEvent class. This command event is intended for commands without a command line, though it simply returns the null String on the getLine() method and returns true on parseLine(java.lang.String[]) if the argument is null.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class stella.CommandEvent
CommandEvent.Create
 
Field Summary
 
Fields inherited from class stella.CommandEvent
COMMANDPACKAGE, JVIEWPACKAGE, TYPESEPARATOR
 
Fields inherited from class stella.MessageEvent
SEPCHAR
 
Fields inherited from class util.rmi.RmiEvent
localHost, sourceName
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SimpleCommand(Object src, String type, long time)
          The required constructor.
 
Method Summary
 String[] getLine()
          Returns null.
 boolean parseLine(String[] cl)
          A default implementation for parsing.
 
Methods inherited from class stella.CommandEvent
classNameToTemplate, createCommand, createCommand, createJCommand, extractType, getExpectedAcknowledgeNumber, parseForStrings, templateToClassName
 
Methods inherited from class stella.MessageEvent
checkType, equals, equalTime, equalTime, fromAscii, getAllCommandLines, getExecuteGroupKey, getHead, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, readFromBufferedStream, setNr, setTime, setType, setValid, toString
 
Methods inherited from class util.rmi.RmiEvent
getHost, getSourceName, setSourceName
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleCommand

public SimpleCommand(Object src,
                     String type,
                     long time)
The required constructor.

Method Detail

parseLine

public boolean parseLine(String[] cl)
A default implementation for parsing. Returns true if the argument is null.

Specified by:
parseLine in class MessageEvent
Returns:
True, if parsing was successful.

getLine

public String[] getLine()
Returns null.

Specified by:
getLine in class MessageEvent
Returns:
An array containing all command lines.