stella.error
Class TargetError

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.TargetError
All Implemented Interfaces:
Serializable, TargetKnowledge, UniqueKnowledge, TargetDepending, Uniquely
Direct Known Subclasses:
TargetFinished, TargetPicked

public class TargetError
extends ErrorEvent
implements TargetKnowledge, UniqueKnowledge

An error event signaling that it has occured during observing of a target.

See Also:
Serialized Form

Field Summary
private  Object id
          The value of the unique parameter in the moment it was registered.
private  TargetDefinition target
          The serializable target definition.
 
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
protected TargetError(Object src)
          Constructs a software error.
 
Method Summary
 TargetDefinition getTarget()
          Returns the target.
 Object getUnique()
          Returns the unique id of this pick, most likely a string.
 void registerTarget(TargetDefinition td)
          Sets the target.
 void registerUnique(Parameter unique)
          Sets the unique ID of the current observation.
 
Methods inherited from class stella.ErrorEvent
consume, createError, createError, createError, createError, createError, createStatus, createStatus, createStatus, extractClassName, extractFollowUp, extractPipe, getErrorClass, getFollowUp, getHuman, getLine, getSevereness, isConsumed, isPipe, isStatus, parseClassName, parseHeader, parseLine, 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

target

private TargetDefinition target
The serializable target definition.


id

private Object id
The value of the unique parameter in the moment it was registered.

Constructor Detail

TargetError

protected TargetError(Object src)
Constructs a software error. Uses the #SEVERENESS level, has a #FOLLOWUP as a recovery strategy an does not pipe.

Method Detail

registerTarget

public void registerTarget(TargetDefinition td)
Sets the target. Only allowed if the target is serializable. If not, target is set to null.

Specified by:
registerTarget in interface TargetDepending

registerUnique

public void registerUnique(Parameter unique)
Sets the unique ID of the current observation. Note that the unique parameter is also listening to target picked to update itself.

Specified by:
registerUnique in interface UniqueKnowledge

getTarget

public TargetDefinition getTarget()
Returns the target. Null if target was not set or not serializable.

Specified by:
getTarget in interface TargetKnowledge

getUnique

public Object getUnique()
Returns the unique id of this pick, most likely a string. Returns null if not registered. Note that the unique parameter is also listening to target picked to update itself.

Specified by:
getUnique in interface Uniquely