Macht so ein Interface Eurer Meinung nach SIN oder ist es nur UNSIN?
Code:
package de.redsky_it.utils;
/**
* Interface for standard [b]start[/b] and [b]shutdown[/b] of all your java applikations.
* @author archy
*/
public interface Init {
/**
*
Method boot()</p>
*
* Here you should do all your classloading and objectcreation.
* Finaly you can start your application with the last lines in the bootmethod.
* </p>
* <pre>
* ...
* // Classloading
* ...
*
* // Objectcreation
* ...
*
* // start application (gui or server)
* ...
*
* </pre>
*/
public void boot();
/**
*
Method shutdown()</p>
*
</p>
* <pre>
* ...
* // Flushing and closing files
* ...
*
* // Closing databaseconnections
* ...
*
* // Disposing objects
* ...
*
* System.exit(exitcode);
* </pre>
* @param exitcode - Application exitcode
*/
public void shutDown(int exitcode);
/**
*
Method reboot()</p>
*
* Like <code>shutdown()</code> method but does not exit to system!
* Java virtual machine keeps on running so that you
* can restart your application with the <code>boot()</code> method.
* </p>
* <pre>
* ...
* // Flushing and closing files
* ...
*
* // Closing databaseconnections
* ...
*
* // Disposing objects
* ...
*
* boot();
* </pre>
*/
public void reboot();
}