util
Interface StepInitializable

All Known Implementing Classes:
AdapterMaster, AdapterSimulator, AuxiliaryMaster, CalibrationMaster, CalibrationSimulator, DeviceSimulator, DomeMaster, DomeSimulator, EnvironmentMaster, EnvironmentSimulator, GenericMaster, GenericMaster.Standalone, GenericSimulator, ReceiverTorso, SesMaster, SesSimulator, ShelterMaster, TelescopeMaster, TelescopeSimulator, TestReceiver, WifsipMaster, WifsipSimulator

public interface StepInitializable

This interface is used concurrently with Initializable. For classes that need a step-wise init, similar to Initializable.init(), the only method in this interface, initStep(int) is called repetedly until the depth of the initialization process has been reached, see KEY_INITDEPTH. It should only be used in object creation processes invoked with PropertyContainer.createFrom(java.util.Map, java.lang.Class). The use of the simpler interface Initializable is highly encouraged as readability of the code increases if one init depth is enough. This interface is intended to enhance the readability of the code in case of nested initializations. If classes implement both, this interface is considered higher priority and the #init method of Initializable is never called.


Field Summary
static String KEY_INITDEPTH
          The key that should be linked to the depth of the initialization process.
 
Method Summary
 void initStep(int depth)
          This method is called repeatedly with integers starting from zero until the {KEY_INITDEPTH is reached.
 

Field Detail

KEY_INITDEPTH

static final String KEY_INITDEPTH
The key that should be linked to the depth of the initialization process. During creation of implementing classes using the PropertyContainer.createFrom(java.util.Map, java.lang.Class) method, the initStep(int) method is called repreatedly with integers starting from zero to the value mapped by this property. Mapping to negative values should indicate that the object should not be initialized after creation.

See Also:
Constant Field Values
Method Detail

initStep

void initStep(int depth)
This method is called repeatedly with integers starting from zero until the {KEY_INITDEPTH is reached. It should only be invoked directly after the object has been constructed, and never later.

Parameters:
depth - The current initialization depth.