stella
Class AbstractErrorFinalizer

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.AbstractErrorFinalizer
All Implemented Interfaces:
Cloneable, ErrorFinalizing, Initializable, PropertyBearing
Direct Known Subclasses:
GoodWeatherFinalizer, LostGuidingFinalizer, MailFinalizer, MasterErrorHandler.NoneErrorFinalizer, RegainedGuidingFinalizer, ResendCommandFinalizer, SequenceErrorFinalizer, WakeFinalizer, XMLErrorFinalizer

public abstract class AbstractErrorFinalizer
extends PropertyContainer
implements ErrorFinalizing

An abstract implementation of the ErrorFinalizing interface. It allows creation of an ErrorFinalizing instance out of a properties object, provided the PropertyBearing.KEY_CLASS key is present.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private  Object monitor
          The object to notify.
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractErrorFinalizer(Map sprop)
          Protected constructer defining this error finalizer's properties.
 
Method Summary
static ErrorFinalizing createErrorFinalizer(Map prop)
          Constructs a new error finalizer instance using the mapping of the PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate.
 boolean isAborting()
          Default implementation for aborting.
 void setMonitor(Object sleeper)
          Registers a sleeper object to the error handler.
protected  void wake()
          Notifies all waiting thread on the monitor object.
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, init, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.ErrorFinalizing
finalizeError, getFollowUp, isFinalizing
 
Methods inherited from interface util.PropertyBearing
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

monitor

private Object monitor
The object to notify.

Constructor Detail

AbstractErrorFinalizer

protected AbstractErrorFinalizer(Map sprop)
Protected constructer defining this error finalizer's properties.

Method Detail

createErrorFinalizer

public static final ErrorFinalizing createErrorFinalizer(Map prop)
Constructs a new error finalizer instance using the mapping of the PropertyBearing.KEY_CLASS to the class name to derive the class to instantiate. If this property is defined, a new error finalizing instance with the stated class name is created, the supplied properties used as an argument in the constructor. If the object generated also implements the Initializable interface, its Initializable.init() method is called right after construction. If unsuccessful, null is returned.


isAborting

public boolean isAborting()
Default implementation for aborting. Returns false.

Specified by:
isAborting in interface ErrorFinalizing

setMonitor

public void setMonitor(Object sleeper)
Registers a sleeper object to the error handler. Notified with a call to the protected wake() method.

Specified by:
setMonitor in interface ErrorFinalizing

wake

protected void wake()
Notifies all waiting thread on the monitor object. A monitor must be registered with a call to setMonitor(java.lang.Object).