public class Daemon extends java.lang.Thread implements Stoppable
Constructor and Description |
---|
Daemon(int port,
ProxyControl target)
Create a new Daemon with the specified port and target.
|
Daemon(int port,
ProxyControl target,
java.lang.Class<? extends Proxy> proxyClass)
Create a new Daemon with the specified port and target, using the
specified class to handle individual requests.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Listen on the daemon port and handle incoming requests.
|
void |
stopServer()
Stop the proxy daemon.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public Daemon(int port, ProxyControl target) throws java.io.IOException
port
- the port to listen on.target
- the target which will receive the generated JMeter test
components.java.io.IOException
- if an I/O error occurs opening the socketjava.lang.IllegalArgumentException
- if port
is outside the allowed range from 0
to 65535
java.net.SocketException
- when something is wrong on the underlying protocol layerpublic Daemon(int port, ProxyControl target, java.lang.Class<? extends Proxy> proxyClass) throws java.io.IOException
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. This
class must be the Proxy
class or a subclass.java.io.IOException
- if an I/O error occurs opening the socketjava.lang.IllegalArgumentException
- if port
is outside the allowed range from 0
to 65535
java.net.SocketException
- when something is wrong on the underlying protocol layerpublic void run()
stopServer()
is called or an error occurs.run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void stopServer()
stopServer
in interface Stoppable
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.