Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.report » [javadoc | source]
    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *   http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    * 
   17    */
   18   package org.apache.jmeter.report;
   19   
   20   import java.util.Date;
   21   import java.util.List;
   22   import java.util.Set;
   23   
   24   import org.apache.jmeter.visualizers.SamplingStatCalculator;
   25   import org.apache.jmeter.visualizers.Visualizer;
   26   
   27   /**
   28    *
   29    * DataSet extends Visualizer so that it can be used with ResultCollector.
   30    * Classes implementing the interface should create a new instance of
   31    * ResultCollector and call setListener(Visualizer) passing itself.
   32    * When the ResultCollector.loadExistingFile is called, it will pass
   33    * the SampleResults.
   34    */
   35   public interface DataSet extends Visualizer {
   36   
   37       /**
   38        * Depending on the implementation, the datasouce could be a file
   39        * or a RDBMS. It's up to the implementing class to decide.
   40        * @param datasource
   41        */
   42       public void setDataSource(String datasource);
   43       /**
   44        * Return the datasource. For files, it should be the absolute path.
   45        * For databases, it should be the datasource name created in jmeter.
   46        */
   47       public String getDataSource();
   48       /**
   49        * In some cases, we may want to return a string that isn't the full
   50        * datasource string or something different. For example, we may
   51        * want to return just the filename and not the absolutePath of
   52        * a JTL file.
   53        */
   54       public String getDataSourceName();
   55       /**
   56        * Set the timestamp using the first result from the datasource
   57        * @param stamp
   58        */
   59       public void setStartTimestamp(long stamp);
   60       /**
   61        * return the timestamp in millisecond format.
   62        */
   63       public long getStartTimestamp();
   64       /**
   65        * Set the timestamp using the last result from the datasource
   66        * @param stamp
   67        */
   68       public void setEndTimestamp(long stamp);
   69       /**
   70        * return the timestamp in millisecond format.
   71        */
   72       public long getEndTimestamp();
   73       /**
   74        * Return the Date object using the start timestamp
   75        */
   76       public Date getDate();
   77       /**
   78        * convienance method for getting the date in mmdd format
   79        */
   80       public String getMonthDayDate();
   81       /**
   82        * convienant method for getting the date in yyyymmdd format
   83        */
   84       public String getMonthDayYearDate();
   85       /**
   86        * Classes implementing the method should return the URL's in the 
   87        * DataSet. It is up to the class to return Strings or URL.
   88        */
   89       public Set getURLs();
   90       /**
   91        * Classes implementing the method should return instance of 
   92        * SamplingStatCalculator.
   93        * @return the set of statistics
   94        */
   95       public Set getStats();
   96       /**
   97        * Return the SamplingStatCalculator for a specific URL.
   98        * @param url
   99        */
  100       public SamplingStatCalculator getStatistics(String url);
  101       /**
  102        * Convienance method for getting all the SamplingStatCalculators for
  103        * a given URL.
  104        * @param urls
  105        */
  106       public List getStats(List urls);
  107       /**
  108        * Classes implementing the method should load the data from
  109        * the target location. It doesn't necessarily have to be a
  110        * file. It could be from a database.
  111        */
  112       public void loadData();
  113   }

Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.report » [javadoc | source]