}
/**
- * Bootstraps application
+ * Main method (entry point)
+ * <p>
+ * @param args the command line arguments
+ */
+ public static void main (String[] args) {
+ // Start application
+ new AddressbookApplication().start(args);
+ }
+
+ /**
+ * Getter for printable application name
+ * <p>
+ * @return A printable name
*/
+ public static String printableTitle () {
+ return MessageFormat.format("{0} v{1}", APP_TITLE, APP_VERSION); //NOI18N
+ }
+
@Override
public void doBootstrap () {
this.getLogger().logDebug("Initializing application ..."); //NOI18N
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Main loop of the application
- */
@Override
public void doMainLoop () throws MenuInitializationException {
// Get client and cast it
System.exit(0);
}
+ /**
+ * Enables console client by setting propper flag
+ */
+ private void enableConsoleClient () {
+ this.getLogger().logDebug("Enabling console client (may become optional client) ..."); //NOI18N
+ this.consoleClient = true;
+ this.guiClient = false;
+ }
+
+ /**
+ * Enables GUI client by setting propper flag
+ */
+ private void enableGuiClient () {
+ this.getLogger().logDebug("Enabling GUI client (may become new default client) ..."); //NOI18N
+ this.consoleClient = false;
+ this.guiClient = true;
+ }
+
/**
* Initializes this application
*/
}
}
- /**
- * Logs given exception
- *
- * @param exception Throwable
- */
- protected void logException (final Throwable exception) {
- this.getLogger().logException(exception);
- }
-
/**
* Initializes properties
*/
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
- /**
- * Log exception and abort program.
- *
- * @param throwable Throwable
- */
- protected void abortProgramWithException (final Throwable throwable) {
- // Log exception
- this.logException(throwable);
-
- // Abort here
- System.exit(1);
- }
-
- /**
- * Enables console client by setting propper flag
- */
- private void enableConsoleClient () {
- this.getLogger().logDebug("Enabling console client (may become optional client) ..."); //NOI18N
- this.consoleClient = true;
- this.guiClient = false;
- }
-
- /**
- * Enables GUI client by setting propper flag
- */
- private void enableGuiClient () {
- this.getLogger().logDebug("Enabling GUI client (may become new default client) ..."); //NOI18N
- this.consoleClient = false;
- this.guiClient = true;
- }
-
/**
* Checks whether the client shoule be console client should be launched by
* checking if -console is set.
}
/**
- * Main method (entry point)
+ * Log exception and abort program.
* <p>
- * @param args the command line arguments
+ * @param throwable Throwable
*/
- public static void main (String[] args) {
- // Start application
- new AddressbookApplication().start(args);
+ protected void abortProgramWithException (final Throwable throwable) {
+ // Log exception
+ this.logException(throwable);
+
+ // Abort here
+ System.exit(1);
}
/**
- * Getter for printable application name
+ * Getter for logger instance
* <p>
- * @return A printable name
+ * @return Logger instance
*/
- public static String printableTitle () {
- return MessageFormat.format("{0} v{1}", APP_TITLE, APP_VERSION); //NOI18N
+ protected LoggerBeanLocal getLogger () {
+ return this.logger;
}
/**
- * Getter for logger instance
- *
- * @return Logger instance
+ * Logs given exception
+ * <p>
+ * @param exception Throwable
*/
- protected LoggerBeanLocal getLogger () {
- return this.logger;
+ protected void logException (final Throwable exception) {
+ this.getLogger().logException(exception);
}
+
}