Class Daemon
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.jmeter.protocol.http.proxy.Daemon
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
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<? extends Proxy> proxyClass)
Create a new Daemon with the specified port and target, using the specified class to handle individual requests.
-
Method Summary
All Methods Instance Methods Concrete Methods 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, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
Daemon
public Daemon(int port, ProxyControl target) throws IOException
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.- Throws:
IOException
- if an I/O error occurs opening the socketIllegalArgumentException
- ifport
is outside the allowed range from0
to65535
SocketException
- when something is wrong on the underlying protocol layer
-
Daemon
public Daemon(int port, ProxyControl target, Class<? extends Proxy> proxyClass) throws IOException
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. This class must be theProxy
class or a subclass.- Throws:
IOException
- if an I/O error occurs opening the socketIllegalArgumentException
- ifport
is outside the allowed range from0
to65535
SocketException
- when something is wrong on the underlying protocol layer
-
-
Method Detail
-
run
public void run()
Listen on the daemon port and handle incoming requests. This method will not exit untilstopServer()
is called or an error occurs.
-
stopServer
public void stopServer()
Stop the proxy daemon. The daemon may not stop immediately. see #ACCEPT_TIMEOUT- Specified by:
stopServer
in interfaceStoppable
-
-