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;
22  
23  /***
24   * @author Jeremy Thomerson
25   * @version $Id$
26   */
27  public interface IDataRetriever extends Cloneable {
28      
29      public static final Float ZERO = new Float(0);
30      
31      public static final IDataRetriever NO_OP_DATA_RETRIEVER = new IDataRetriever() {
32          /***
33           * @return This implementation returns <tt>null</tt> so that nothing is recorded.
34           *              It may be used for reports that do not need to log data with each
35           *              run.  For instance, a BasePerReportTemplatingReporter that gets it's data
36           *              from another data source, not this logged data.
37           */
38          public Float getData(IDashboardAgent agent) { return null; }
39          public Object clone() throws CloneNotSupportedException {
40              return NO_OP_DATA_RETRIEVER;
41          }
42      };
43  
44      Float getData(IDashboardAgent agent);
45      Object clone() throws CloneNotSupportedException;
46      
47  }
48