stella.parameter
Class ErrorTrigger
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractTrigger
stella.parameter.SimpleTrigger
stella.parameter.ErrorTrigger
- All Implemented Interfaces:
- Cloneable, ErrorDependingParameter, Parameter, Trigger, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying
public class ErrorTrigger
- extends SimpleTrigger
- implements ErrorDependingParameter, Reloadable
A trigger that gets true when a certain error event is sent to the SCS.
|
Field Summary |
static String |
KEY_FALSE
The class name of the error that set this trigger to false. |
static String |
KEY_TRUE
The class name of the error that set this trigger to true. |
| Methods inherited from class stella.parameter.AbstractParameter |
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| Methods inherited from class util.PropertyResources |
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties |
| 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 |
KEY_TRUE
public static final String KEY_TRUE
- The class name of the error that set this trigger to true.
- See Also:
- Constant Field Values
KEY_FALSE
public static final String KEY_FALSE
- The class name of the error that set this trigger to false.
- See Also:
- Constant Field Values
ErrorTrigger
public ErrorTrigger(Map prop)
- Constructs a new error trigger. The initial state of the trigger is
set.
rescanned
public double rescanned(String key,
String old,
String newval)
- Makes this method public, no further changes.
- Specified by:
rescanned in interface Reloadable- Overrides:
rescanned in class SimpleTrigger
getForError
public Object getForError(ErrorEvent err)
- Sets the trigger value according to the error received. If the class
name of the error matches the
KEY_TRUE or the
KEY_FALSE
class name the trigger is set to true or false, respectively. If the
error class is not known, null is returned;
- Specified by:
getForError in interface ErrorDependingParameter
registerError
public void registerError(ErrorEvent err)
- Registers the error to this trigger. If the class
name of the error matches the
KEY_TRUE or the
KEY_FALSE
class name the trigger is set to true or false, respectively. If the
error class is not known, nothing changes.
- Specified by:
registerError in interface ErrorDependingParameter
isInList
private static boolean isInList(String check,
String list)
- Checks if the given name is in a comma-separated list of names.
Returns true if an exact match is found. Is case-sensitive.
- Parameters:
check - The String to find.list - The comma-separated list of possible matches.