jestr.conf.props
Interface Initializer

All Known Implementing Classes:
MyInitializer, MyInitializer

public interface Initializer

This interface is implemented by all classes registered as initializers via the "jestr.preInitializers" and "jestr.postInitializers" properties. "preInitialize()" is called if the object is being used as a preinitializer, or "postInitialize()" if the object is being used as a postinitializer. The same object can serve as both preinitializer and postinitializer.

Any initializer class that is to be declared via the "jestr.preInitializers" or "jestr.postInitializers" properties must declare a public no-arg constructor.

Author:
David Gilliland

Method Summary
 void postInitialize(Factory factory, java.util.Properties props, java.io.File file)
           This method is called after all properties have been processed.
 void preInitialize(Factory factory, java.util.Properties props, java.io.File file)
           This method is called before any properties have been processed.
 

Method Detail

preInitialize

public void preInitialize(Factory factory,
                          java.util.Properties props,
                          java.io.File file)
                   throws java.lang.Exception
This method is called before any properties have been processed. This method is permitted to alter the properties through props.putProperty() and any changes will be treated just as though they were present in the original properties.

Parameters:
factory - - The Factory being initialized.
props - - The Properties being initialized. The method can change this.
file - - The file from which the properties were read, if available. If no file is available, this parameter will be null, so the method must check for nullness before referencing it.
Throws:
java.lang.Exception - - Any exceptions thrown by this method will be caught and logged by the Jestr framework at ERROR level, but Jestr will continue with the initialization and proceed normally.

postInitialize

public void postInitialize(Factory factory,
                           java.util.Properties props,
                           java.io.File file)
                    throws java.lang.Exception
This method is called after all properties have been processed.

Parameters:
factory - - The Factory being initialized.
props - - The Properties being initialized. Any changes to this will be ignored.
file - - The file from which the properties were read, if available. If no file is available, this parameter will be null, so the method must check for nullness before referencing it.
Throws:
java.lang.Exception - - Any exceptions thrown by this method will be caught and logged by the Jestr framework at ERROR level, but Jestr will continue with the initialization and proceed normally.


Copyright (c) 2001-2003 - Apache Software Foundation