Class Daemon

  • All Implemented Interfaces:
    java.lang.Runnable , org.apache.jmeter.gui.Stoppable

    
    public class Daemon
    extends Thread implements Stoppable
                        

    Web daemon thread. Creates main socket on port configured port (8888 by default) and listens on it forever. For each client request, creates a Proxy thread to handle the request.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Daemon(int port, ProxyControl target) Create a new Daemon with the specified port and target.
      Daemon(int port, ProxyControl target, Class<out Proxy> proxyClass) Create a new Daemon with the specified port and target, using the specified class to handle individual requests.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void run() Listen on the daemon port and handle incoming requests.
      void stopServer() Stop the proxy daemon.
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Daemon

        Daemon(int port, ProxyControl target)
        Create a new Daemon with the specified port and target.
        Parameters:
        port - the port to listen on.
        target - the target which will receive the generated JMeter test components.
      • Daemon

        Daemon(int port, ProxyControl target, Class<out Proxy> proxyClass)
        Create a new Daemon with the specified port and target, using the specified class to handle individual requests.
        Parameters:
        port - the port to listen on.
        target - the target which will receive the generated JMeter test components.
        proxyClass - the proxy class to use to handle individual requests.
    • Method Detail

      • run

         void run()

        Listen on the daemon port and handle incoming requests. This method will not exit until stopServer is called or an error occurs.

      • stopServer

         void stopServer()

        Stop the proxy daemon. The daemon may not stop immediately. see #ACCEPT_TIMEOUT