org.apache.jmeter.engine

## Class ClientJMeterEngine

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

- All Implemented Interfaces:
    JMeterEngine

      public class ClientJMeterEngine
      extends java.lang.Object
      implements JMeterEngine

  Class to run remote tests from the client JMeter and collect remote samples

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientJMeterEngine(java.lang.String hostAndPort)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(HashTree testTree)` Configure engine
    `void` | `exit()` Exit engine
    `java.lang.String` | `getHost()`
    `boolean` | `isActive()`
    `void` | `reset()` Stop test if running
    `void` | `runTest()` Runs the test
    `void` | `setProperties(java.util.Properties p)` set Properties on engine
    `void` | `stopTest(boolean now)`
    `static void` | `tidyRMI(org.slf4j.Logger logger)` Tidy up RMI access to allow JMeter client to exit.

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

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

    - ### Methods inherited from interface org.apache.jmeter.engine.JMeterEngine

      `stopTest`

- - ### Constructor Detail

    - #### ClientJMeterEngine

          public ClientJMeterEngine(java.lang.String hostAndPort)
                             throws java.rmi.NotBoundException,
                                    java.rmi.RemoteException

      Throws:
        `java.rmi.NotBoundException`
        `java.rmi.RemoteException`

  - ### Method Detail

    - #### configure

          public void configure(HashTree testTree)

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

    - #### stopTest

          public void stopTest(boolean now)

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

    - #### reset

          public void reset()

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

    - #### 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

    - #### tidyRMI

          public static void tidyRMI(org.slf4j.Logger logger)

      Tidy up RMI access to allow JMeter client to exit. Currently just interrupts the "RMI Reaper" thread.
      Parameters:
        `logger` - where to log the information

    - #### exit

          public void exit()

      Exit engine
      Specified by:
        `exit` in interface `JMeterEngine`

    - #### setProperties

          public void setProperties(java.util.Properties p)

      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

    - #### getHost

          public java.lang.String getHost()

      Returns:
        host or host:port

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