stella.error
Class CommandAborted

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
          extended by stella.MessageEvent
              extended by stella.ErrorEvent
                  extended by stella.error.CommandAborted
All Implemented Interfaces:
Serializable, PickConnected

public class CommandAborted
extends ErrorEvent
implements PickConnected

An error event signaling that a command was aborted. This can have a normal reason in case of a AbortTelescope that was sent, or, more severely, in time of connection loss or sub-command timeouts. The reason for the abort determines the follow-up.

See Also:
Serialized Form

Field Summary
private static String[] FOLLOWUPS
          The follow-ups, in order as above.
private static boolean PIPING
          The pipe flag (false).
private  String reason
          The abort reason.
private static String[] REASONS
          The command abort reasons understood.
private  String running
          The command name that could not be parsed.
private  long runningtime
          The time stamp of the command that was unparsable.
private static int SEVERENESS
          The severness level (fatal error).
private  int state
          The internal state of the aborted command.
private static String[] STUPID
          The reason MOVE_TELESCOPE.
 
Fields inherited from class stella.ErrorEvent
ABORT_EXPOSURE, ABORT_TARGET, ALARM_OFF, ALARM_ON, BAD_SEEING, BAD_WEATHER, CLEAR_TEL, CLOSE_COVER, CLOSE_ROOF, CLOSE_SHUTTER, CONT_TIME, ERROR_TOKEN, ERRORCOMBINE, ERRORPACKAGE, GOOD_WEATHER, HIGH_WIND, MAIL_HOME, MAIL_LOCAL, MOVE_HOME, MOVE_PARK, NONE, OPEN_COVER, OPEN_SHUTTER, PIPE, REACQUIRE, REPOSITION, RESEND_COMMAND, RESET_ADAPTER, RESET_CALIBRATION, RESET_CCD, RESET_ENV, RESET_ERRORS, RESET_SPEC, RESET_TEL, SHUT_DOWN, STATUS_TOKEN, STOP_TIME
 
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
CommandAborted(Object src)
          Constructs a command aborted error.
 
Method Summary
 String getHuman()
          Returns the human-readable part of the string.
 String[] getLine()
          Returns the command lines of the error.
 String getReason()
          Returns the error-reasons as an integer.
 String getRunning()
          Returns the error-reasons as an integer.
 long getRunningTime()
          Returns the inet-addres of the access violator.
 int getState()
          Returns the inet-addres of the access violator.
 boolean parseLine(String[] all)
          Retrieves the command that could not be parsed and the time stamp of this command out of the second command line.
 void setReason(String cause)
          Sets the reason.
 void setRunning(String cause)
          Sets the reason.
 void setRunningTime(long offend)
          Sets the inet-address of the access violator.
 void setState(int offend)
          Sets the inet-address of the access violator.
private  void updateHuman()
          Updates the human-readable part of the error event.
 
Methods inherited from class stella.ErrorEvent
consume, createError, createError, createError, createError, createError, createStatus, createStatus, createStatus, extractClassName, extractFollowUp, extractPipe, getErrorClass, getFollowUp, getSevereness, isConsumed, isPipe, isStatus, parseClassName, parseHeader, setFollowUp, setHuman, setHuman, setPipe
 
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
 

Field Detail

SEVERENESS

private static final int SEVERENESS
The severness level (fatal error).

See Also:
Constant Field Values

STUPID

private static final String[] STUPID
The reason MOVE_TELESCOPE.


REASONS

private static final String[] REASONS
The command abort reasons understood.


FOLLOWUPS

private static final String[] FOLLOWUPS
The follow-ups, in order as above.


PIPING

private static final boolean PIPING
The pipe flag (false).

See Also:
Constant Field Values

running

private String running
The command name that could not be parsed.


runningtime

private long runningtime
The time stamp of the command that was unparsable.


reason

private String reason
The abort reason.


state

private int state
The internal state of the aborted command.

Constructor Detail

CommandAborted

public CommandAborted(Object src)
Constructs a command aborted error. Only after the cause of the error is known, the follow-up can be determined.

Method Detail

parseLine

public boolean parseLine(String[] all)
Retrieves the command that could not be parsed and the time stamp of this command out of the second command line. Additional lines are considered human-readable info only.

Overrides:
parseLine in class ErrorEvent
Returns:
True, if parsing was successful.

getLine

public String[] getLine()
Description copied from class: ErrorEvent
Returns the command lines of the error.

Overrides:
getLine in class ErrorEvent
Returns:
An array containing all command lines.

getHuman

public String getHuman()
Returns the human-readable part of the string. See also main class entry.

Overrides:
getHuman in class ErrorEvent
Returns:
A String holding a readable description of the error.

updateHuman

private void updateHuman()
Updates the human-readable part of the error event. This means calling of ErrorEvent.setHuman(java.lang.String) with values constructed from the internal variables.


getRunning

public String getRunning()
Returns the error-reasons as an integer.


setRunning

public void setRunning(String cause)
Sets the reason.


getRunningTime

public long getRunningTime()
Returns the inet-addres of the access violator.


setRunningTime

public void setRunningTime(long offend)
Sets the inet-address of the access violator.


getReason

public String getReason()
Returns the error-reasons as an integer.


setReason

public void setReason(String cause)
Sets the reason.


getState

public int getState()
Returns the inet-addres of the access violator.


setState

public void setState(int offend)
Sets the inet-address of the access violator.