Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.control » [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   
   19   package org.apache.jmeter.control;
   20   
   21   import org.apache.jmeter.engine.event.LoopIterationListener;
   22   import org.apache.jmeter.samplers.Sampler;
   23   import org.apache.jmeter.testelement.TestElement;
   24   
   25   /**
   26    * This interface is used by JMeterThread in the following manner:
   27    *
   28    * while (running && (sampler = controller.next()) != null)
   29    */
   30   public interface Controller extends TestElement {
   31       /**
   32        * Delivers the next Sampler or null
   33        *
   34        * @return org.apache.jmeter.samplers.Sampler or null
   35        */
   36       public Sampler next();
   37   
   38       /**
   39        * Indicates whether the Controller is done delivering Samplers for the rest
   40        * of the test.
   41        *
   42        * When the top-level controller returns true to JMeterThread,
   43        * the thread is complete.
   44        *
   45        * @return boolean
   46        */
   47       public boolean isDone();
   48   
   49       /**
   50        * Controllers have to notify listeners of when they begin an iteration
   51        * through their sub-elements.
   52        */
   53       public void addIterationListener(LoopIterationListener listener);
   54   
   55       /**
   56        * Called to initialize a controller at the beginning of a test iteration.
   57        */
   58       public void initialize();
   59   }

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