com.ebay.carad.os.vitalsigns
Class DashboardAgent

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.AbstractListenerContainer
      extended by com.ebay.carad.os.vitalsigns.DashboardAgent
All Implemented Interfaces:
IDashboardAgent, IReportingListenerContainer, java.lang.Runnable

public class DashboardAgent
extends AbstractListenerContainer
implements IDashboardAgent, java.lang.Runnable

Version:
$Id$
Author:
Jeremy Thomerson

Field Summary
private static org.apache.log4j.Logger LOGGER
           
private  IDataDAO mDefaultDataDAO
           
private  java.lang.String mDestinationPath
           
private  java.util.List mReports
           
private  boolean mRunHTTPServer
           
private  int mRunHTTPServerPort
           
private  java.lang.String mTitle
           
 
Constructor Summary
DashboardAgent()
           
 
Method Summary
private  void checkConsistency()
           
protected  void fireListenersException(IReportingListenerContainer agent, ReportingException re, IDashboardReport rep)
           
private  void fireReportsListenersCompleted()
           
private  void fireReportsListenersReportingException(IDashboardReport report, ReportingException rex)
           
private  void fireReportsListenersStarted()
           
 IDataDAO getDefaultDataDAO()
           
 java.lang.String getDestinationPath()
           
 java.util.List getReports()
           
 int getRunHTTPServerPort()
           
 java.lang.String getTitle()
           
 boolean isRunHTTPServer()
           
 void run()
           
 void runAllReports()
          In charge of actually running the reports.
 void setDefaultDataDAO(IDataDAO dao)
           
 void setDestinationPath(java.lang.String destinationPath)
           
 void setReports(java.util.List reports)
           
 void setRunHTTPServer(boolean runHTTPServer)
           
 void setRunHTTPServerPort(int runHTTPServerPort)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class com.ebay.carad.os.vitalsigns.AbstractListenerContainer
addReportingListener, fireListenersCompleted, fireListenersReportRan, fireListenersStarted, getReportingListeners, setReportingListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ebay.carad.os.vitalsigns.IReportingListenerContainer
addReportingListener, getReportingListeners
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER

mDefaultDataDAO

private IDataDAO mDefaultDataDAO

mReports

private java.util.List mReports

mDestinationPath

private java.lang.String mDestinationPath

mRunHTTPServer

private boolean mRunHTTPServer

mRunHTTPServerPort

private int mRunHTTPServerPort

mTitle

private java.lang.String mTitle
Constructor Detail

DashboardAgent

public DashboardAgent()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

runAllReports

public void runAllReports()
Description copied from interface: IDashboardAgent
In charge of actually running the reports. This method should trigger the reports each to run, passing them a time when the reporting started. Before the reports are triggered, the PreStart event should be triggered on all listeners registered with the agent, followed by all listeners registered with all reports. Then, after each report is run, the ReportRan event should be triggered, and following completion of all reports, the ReportingComplete event. Note that the listeners of the agent should always be notified before the listeners of the reports. ReportingExceptions thrown by any reports or any listeners of the agent or report should be caught. Then the listeners should be notified of the agent, and then the reports, and processing should continue.

Specified by:
runAllReports in interface IDashboardAgent

fireReportsListenersStarted

private void fireReportsListenersStarted()

fireListenersException

protected void fireListenersException(IReportingListenerContainer agent,
                                      ReportingException re,
                                      IDashboardReport rep)
Overrides:
fireListenersException in class AbstractListenerContainer

fireReportsListenersReportingException

private void fireReportsListenersReportingException(IDashboardReport report,
                                                    ReportingException rex)

fireReportsListenersCompleted

private void fireReportsListenersCompleted()

getDefaultDataDAO

public IDataDAO getDefaultDataDAO()
Specified by:
getDefaultDataDAO in interface IDashboardAgent

getReports

public java.util.List getReports()
Specified by:
getReports in interface IDashboardAgent
Returns:
List<IDashboardReportContainer> reports run by this agent.

setDefaultDataDAO

public void setDefaultDataDAO(IDataDAO dao)

setReports

public void setReports(java.util.List reports)

checkConsistency

private void checkConsistency()

getDestinationPath

public java.lang.String getDestinationPath()
Specified by:
getDestinationPath in interface IDashboardAgent

setDestinationPath

public void setDestinationPath(java.lang.String destinationPath)

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface IDashboardAgent

setTitle

public void setTitle(java.lang.String title)

isRunHTTPServer

public boolean isRunHTTPServer()

setRunHTTPServer

public void setRunHTTPServer(boolean runHTTPServer)

getRunHTTPServerPort

public int getRunHTTPServerPort()

setRunHTTPServerPort

public void setRunHTTPServerPort(int runHTTPServerPort)


Copyright © 2004-2009. All Rights Reserved.