org.apache.jmeter.engine

## Class StandardJMeterEngine

- java.lang.Object
- - org.apache.jmeter.engine.StandardJMeterEngine

- All Implemented Interfaces:
    Runnable, JMeterEngine

      public class StandardJMeterEngine
      extends Object
      implements JMeterEngine, Runnable

  Runs JMeter tests, either directly for local GUI and non-GUI invocations, or started by `RemoteJMeterEngineImpl` when running in server mode.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardJMeterEngine()`
    `StandardJMeterEngine(String host)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `askThreadsToStop()` Clean shutdown ie, wait for end of current running samplers
    `void` | `configure(HashTree testTree)` Configure engine
    `void` | `exit()` Remote exit Called by RemoteJMeterEngineImpl.rexit() and by notifyTestListenersOfEnd() iff exitAfterTest is true; in turn that is called by the run() method and the StopTest class also called
    `boolean` | `isActive()`
    `static void` | `register(TestStateListener tl)`
    `void` | `reset()` Stop test if running
    `void` | `run()`
    `void` | `runTest()` Runs the test
    `void` | `setProperties(Properties p)` set Properties on engine
    `static void` | `stopEngine()`
    `static void` | `stopEngineNow()`
    `void` | `stopTest()` Stop Test Now
    `void` | `stopTest(boolean now)`
    `static boolean` | `stopThread(String threadName)`
    `static boolean` | `stopThreadNow(String threadName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StandardJMeterEngine

          public StandardJMeterEngine()

    - #### StandardJMeterEngine

          public StandardJMeterEngine(String host)

  - ### Method Detail

    - #### stopEngineNow

          public static void stopEngineNow()

    - #### stopEngine

          public static void stopEngine()

    - #### register

          public static void register(TestStateListener tl)

    - #### stopThread

          public static boolean stopThread(String threadName)

    - #### stopThreadNow

          public static boolean stopThreadNow(String threadName)

    - #### configure

          public void configure(HashTree testTree)

      Description copied from interface: `JMeterEngine`
      Configure engine
      Specified by:
        `configure` in interface `JMeterEngine`
      Parameters:
        `testTree` - the test plan

    - #### runTest

          public void runTest()
                       throws JMeterEngineException

      Description copied from interface: `JMeterEngine`
      Runs the test
      Specified by:
        `runTest` in interface `JMeterEngine`
      Throws:
        `JMeterEngineException` - if an error occurs

    - #### reset

          public void reset()

      Description copied from interface: `JMeterEngine`
      Stop test if running
      Specified by:
        `reset` in interface `JMeterEngine`

    - #### stopTest

          public void stopTest()

      Stop Test Now
      Specified by:
        `stopTest` in interface `JMeterEngine`

    - #### stopTest

          public void stopTest(boolean now)

      Specified by:
        `stopTest` in interface `JMeterEngine`
      Parameters:
        `now` - boolean that tell whether stop is immediate (interrupt) or not (wait for current sample end)

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### askThreadsToStop

          public void askThreadsToStop()

      Clean shutdown ie, wait for end of current running samplers

    - #### exit

          public void exit()

      Remote exit Called by RemoteJMeterEngineImpl.rexit() and by notifyTestListenersOfEnd() iff exitAfterTest is true; in turn that is called by the run() method and the StopTest class also called
      Specified by:
        `exit` in interface `JMeterEngine`

    - #### setProperties

          public void setProperties(Properties p)

      Description copied from interface: `JMeterEngine`
      set Properties on engine
      Specified by:
        `setProperties` in interface `JMeterEngine`
      Parameters:
        `p` - the properties to set

    - #### isActive

          public boolean isActive()

      Specified by:
        `isActive` in interface `JMeterEngine`
      Returns:
        boolean Flag to show whether engine is active (true when test is running). Set to false at end of test

Copyright © 1998-2022 Apache Software Foundation. All Rights Reserved.