View Javadoc

1   /*
2    * The contents of this file are subject to the terms 
3    * of the Common Development and Distribution License 
4    * (the "License").  You may not use this file except 
5    * in compliance with the License.
6    * 
7    * You can obtain a copy of the license at 
8    * http://www.sun.com/cddl/cddl.html. 
9    * See the License for the specific language governing 
10   * permissions and limitations under the License.
11   * 
12   * When distributing Covered Code, include this CDDL 
13   * HEADER in each file and include the License file at 
14   * license.txt.  If applicable, add the following below 
15   * this CDDL HEADER, with the fields enclosed by brackets 
16   * "[]" replaced with your own identifying information: 
17   * Portions Copyright [yyyy] [name of copyright owner]
18   * 
19   * Portions Copyright 2004 eBay, Inc.
20   */
21  package com.ebay.carad.os.vitalsigns.dao;
22  
23  import com.ebay.carad.os.vitalsigns.DataPoint;
24  import com.ebay.carad.os.vitalsigns.IDashboardReport;
25  import com.ebay.carad.os.vitalsigns.IReportingListenerContainer;
26  import com.ebay.carad.os.vitalsigns.ReportingException;
27  
28  /***
29   * Interface for dealing with the standard-type "data in timeline" type reports.
30   * 
31   * @author Jeremy Thomerson
32   * @version $Id$
33   */
34  public interface IDataDAO {
35  
36      public static final DataPoint[] EMPTY_DATA_POINT_ARRAY = new DataPoint[0];
37      
38      public static final IDataDAO NO_OP_INSTANCE = new IDataDAO() {
39          public void storeReportData(float data, IReportingListenerContainer agent, IDashboardReport report) {
40              // no-op
41          }
42  
43          public DataPoint[] getData(IDashboardReport report) {
44              return EMPTY_DATA_POINT_ARRAY;
45          }
46      };
47  
48      void storeReportData(float data, IReportingListenerContainer agent, IDashboardReport report) throws ReportingException;
49      
50      DataPoint[] getData(IDashboardReport report) throws ReportingException;
51  }
52