net.sourceforge.buildmonitor.monitors
Class CruiseControlRssMonitor

java.lang.Object
  extended by net.sourceforge.buildmonitor.monitors.CruiseControlRssMonitor
All Implemented Interfaces:
java.lang.Runnable, Monitor

public class CruiseControlRssMonitor
extends java.lang.Object
implements Monitor

The run method of this Runnable implementation monitor a Cruise Control build using Cruise Control RSS feeds.

Author:
sbrunot

Constructor Summary
CruiseControlRssMonitor(BuildMonitor theApplicationInstance, java.net.URL theUrlToTheCruiseControlRssFeed, java.text.DateFormat theRssFeedDateFormat, int theUpdatePeriodInSeconds)
          Create a new instance.
 
Method Summary
 void displayOptionsDialog()
          Display the options dialog on screen.
 java.net.URI getBuildURI(java.lang.String theIdOfTheBuild)
          Return an URI to the dedicated page of a build on the monitored build system
protected  java.util.Map<java.lang.String,RssFeedItem> getLastBuildsStatus()
          Exposes last builds status for unit testing...
 java.net.URI getMainPageURI()
          Return an URI to the main page of the monitored build system
 java.lang.String getMonitoredBuildSystemName()
          Return the name of the monitored build system (to be used in tray icon popup menu entries)
 java.lang.String getSystemTrayIconTooltipHeader()
          Get the String to display as the first line of the Tooltip of the system tray icon.
 void run()
          TODO: IMPLEMENTS AND DOCUMENTS ME !
 void stop()
          TODO: DO SOMETHING BETTER HERE....
protected  void updateBuildStatusGui()
          TODO: WHAT IS THE LIMITATION ON TOOLTIPS LENGTH ?
protected  void updateStatus()
          TODO: IMPLEMENTS ME AND DOCUMENT ME !
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CruiseControlRssMonitor

public CruiseControlRssMonitor(BuildMonitor theApplicationInstance,
                               java.net.URL theUrlToTheCruiseControlRssFeed,
                               java.text.DateFormat theRssFeedDateFormat,
                               int theUpdatePeriodInSeconds)
Create a new instance.

Parameters:
theApplicationInstance - the build monitor instance this thread is running for
theUrlToTheCruiseControlRssFeed - URL to the cruise control rss feed to monitor
theUpdatePeriodInSeconds - period in seconds between to checks of the rss feed to update the build status
Method Detail

run

public void run()
TODO: IMPLEMENTS AND DOCUMENTS ME !

Specified by:
run in interface java.lang.Runnable

stop

public void stop()
TODO: DO SOMETHING BETTER HERE.... Stop the thread execution

Specified by:
stop in interface Monitor

getMainPageURI

public java.net.URI getMainPageURI()
Return an URI to the main page of the monitored build system

Specified by:
getMainPageURI in interface Monitor

getBuildURI

public java.net.URI getBuildURI(java.lang.String theIdOfTheBuild)
Return an URI to the dedicated page of a build on the monitored build system

Specified by:
getBuildURI in interface Monitor
Parameters:
theIdOfTheBuild - the Id of the build (as in the BuildReport)
Returns:
an URI to the dedicated page of a build on the monitored build system

getSystemTrayIconTooltipHeader

public java.lang.String getSystemTrayIconTooltipHeader()
Get the String to display as the first line of the Tooltip of the system tray icon.

Specified by:
getSystemTrayIconTooltipHeader in interface Monitor
Returns:
the String to display as the first line of the Tooltip of the system tray icon.

displayOptionsDialog

public void displayOptionsDialog()
Display the options dialog on screen.

Specified by:
displayOptionsDialog in interface Monitor

getMonitoredBuildSystemName

public java.lang.String getMonitoredBuildSystemName()
Return the name of the monitored build system (to be used in tray icon popup menu entries)

Specified by:
getMonitoredBuildSystemName in interface Monitor
Returns:
the name of the monitored build system

updateStatus

protected void updateStatus()
                     throws MonitoringException
TODO: IMPLEMENTS ME AND DOCUMENT ME !

Throws:
MonitoringException

updateBuildStatusGui

protected void updateBuildStatusGui()
TODO: WHAT IS THE LIMITATION ON TOOLTIPS LENGTH ?


getLastBuildsStatus

protected java.util.Map<java.lang.String,RssFeedItem> getLastBuildsStatus()
Exposes last builds status for unit testing...

Returns:
the last builds status (see internal documentation)


Copyright © 2007. All Rights Reserved.