|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanet.generic.commonapi.GenericApp
This class only attemps to help to programmers make more simple the initialization of the
required context of new applications. Are two ways to initialize the context:
One
The new application must extends this GenericApp and includes in theirs constructors the
sentence super() or super(factoriesProperties,simProperties,chordProperties).
For example:
public NewTest() throws InitializationException {
super(factoriesProperties,simProperties,chordProperties);
where parameters of super() constructor are the path to specified files.
Two
Includes theese lines before anything that make reference to the network and the simulator and ...
Properties.init(factoriesProperties,simProperties,chordProperties);
GenericFactory.init();
where parameters of init() method are the path to specified files.
Constructor Summary | |
GenericApp()
Make required initialization on the context of the application. |
|
GenericApp(java.lang.String factoriesProperties,
java.lang.String simProperties,
java.lang.String chordProperties)
Make required initialization on the context of the application. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericApp() throws InitializationException
Properties.init("../conf/factories.properties","../conf/sim.properties","../conf/chord.properties"); GenericFactory.init();Because of theese lines, the new application must be executed under bin directory.
InitializationException
- if any error has occurred during initialization of the context.public GenericApp(java.lang.String factoriesProperties, java.lang.String simProperties, java.lang.String chordProperties) throws InitializationException
Properties.init(factoriesProperties,simProperties,chordProperties); GenericFactory.init();Because of theese lines, the new application must be executed under the implicitly specified directory by the parameters files.
factoriesProperties
- Path to properties file of factories attributes.simProperties
- Path to properties file of simulator attributes.chordProperties
- Path to properties file of chord attributes.
InitializationException
- if any error has occurred during initialization of the context.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |