net.sourceforge.buildmonitor
Class BuildMonitorImpl

java.lang.Object
  extended by net.sourceforge.buildmonitor.BuildMonitorImpl
All Implemented Interfaces:
java.lang.Runnable, BuildMonitor

public class BuildMonitorImpl
extends java.lang.Object
implements java.lang.Runnable, BuildMonitor

The main class of the application.

Author:
sbrunot

Field Summary
 
Fields inherited from interface net.sourceforge.buildmonitor.BuildMonitor
MESSAGEKEY_ERROR_DIALOG_TITLE, MESSAGEKEY_ERROR_SYSTEMTRAY_NOT_SUPPORTED, MESSAGEKEY_TRAYICON_INITIAL_TOOLTIP, MESSAGEKEY_TRAYICON_MENU_EXIT, MESSAGEKEY_TRAYICON_MENU_SORT, MESSAGEKEY_TRAYICON_MENUITEM_ABOUT, MESSAGEKEY_TRAYICON_MENUITEM_BUILD_SERVER_HOME_PAGE_SUFFIX, MESSAGEKEY_TRAYICON_MENUITEM_EXIT, MESSAGEKEY_TRAYICON_MENUITEM_OPTIONS, MESSAGEKEY_TRAYICON_MENUITEM_SORT_BY_AGE, MESSAGEKEY_TRAYICON_MENUITEM_SORT_BY_NAME, MESSAGEKEY_TRAYICON_MENUITEM_UPDATE_STATUS_NOW, MESSAGEKEY_UNEXPECTED_ERROR_MESSAGE
 
Constructor Summary
BuildMonitorImpl()
           
 
Method Summary
 java.awt.Image getDialogsDefaultIcon()
          Returns the default icon to be displayed by dialogs opened by monitors
 java.lang.String getMessage(java.lang.String theMessageKey)
          Get a message identified by its key in the application resource bundle.
protected  java.lang.String getStackTrace(java.lang.Throwable theThrowable)
          Return the stack trace of a throwable as a String
 void panic(java.lang.String theErrorMessage)
          The method to call when an unrecoverable error occurs in the application and you want to display your own message (instead of a generic one).It displays your error message to the end user and then exit.
 void panic(java.lang.Throwable theUnexpectedError)
          The method to call when an unrecoverable error occurs in the application.
 void reportConfigurationUpdatedToBeTakenIntoAccountImmediately()
          Report an update of the monitor configuration to be taken into account immediately
 void reportMonitoringException(MonitoringException theMonitoringException)
          Report a monitoring exception (this method is called by build monitors to notify that a monitoring exception occured)
 void run()
          TODO: DOCUMENTS ME !
protected  void showErrorMessage(java.lang.String theErrorMessage)
          displays an error message in a dialog.
 void updateBuildStatus(java.util.List<BuildReport> theBuildsStatus)
          TODO: TRES TRES CHAUD...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildMonitorImpl

public BuildMonitorImpl()
Method Detail

run

public void run()
TODO: DOCUMENTS ME !

Specified by:
run in interface java.lang.Runnable

panic

public void panic(java.lang.String theErrorMessage)
The method to call when an unrecoverable error occurs in the application and you want to display your own message (instead of a generic one).It displays your error message to the end user and then exit.

Specified by:
panic in interface BuildMonitor
Parameters:
theErrorMessage - the error message to display to the end user.

panic

public void panic(java.lang.Throwable theUnexpectedError)
The method to call when an unrecoverable error occurs in the application. It displays an error message to the end user and then exit.

Specified by:
panic in interface BuildMonitor
Parameters:
theUnexpectedError - the Throwable that was unexpected.

getMessage

public java.lang.String getMessage(java.lang.String theMessageKey)
Get a message identified by its key in the application resource bundle. The available messages key for the application all begins with prefix MESSAGEKEY_.

Specified by:
getMessage in interface BuildMonitor
Parameters:
theMessageKey - the message key
Returns:
the message

getDialogsDefaultIcon

public java.awt.Image getDialogsDefaultIcon()
Returns the default icon to be displayed by dialogs opened by monitors

Specified by:
getDialogsDefaultIcon in interface BuildMonitor
Returns:
the default icon to be displayed by dialogs opened by monitors

reportMonitoringException

public void reportMonitoringException(MonitoringException theMonitoringException)
Report a monitoring exception (this method is called by build monitors to notify that a monitoring exception occured)

Specified by:
reportMonitoringException in interface BuildMonitor
Parameters:
theMonitoringException - the monitoring exception to display to the end user

reportConfigurationUpdatedToBeTakenIntoAccountImmediately

public void reportConfigurationUpdatedToBeTakenIntoAccountImmediately()
Report an update of the monitor configuration to be taken into account immediately

Specified by:
reportConfigurationUpdatedToBeTakenIntoAccountImmediately in interface BuildMonitor

updateBuildStatus

public void updateBuildStatus(java.util.List<BuildReport> theBuildsStatus)
TODO: TRES TRES CHAUD... A TESTER DE MANIERE AUTOMATISEE !!!! Update the build status (this method is called by build monitors to update the GUI when the build status has changed).

Specified by:
updateBuildStatus in interface BuildMonitor
Parameters:
theBuildsStatus - a List that contains the each build report to use to update the global status.

showErrorMessage

protected void showErrorMessage(java.lang.String theErrorMessage)
displays an error message in a dialog.

Parameters:
theErrorMessage - the error message to display

getStackTrace

protected java.lang.String getStackTrace(java.lang.Throwable theThrowable)
Return the stack trace of a throwable as a String

Parameters:
theThrowable -
Returns:


Copyright © 2007. All Rights Reserved.