org.apache.jmeter.protocol.http.proxy

Class Daemon


public class Daemon
extends Thread

Web daemon thread. Creates main socket on port 8080 and listens on it forever. For each client request, creates a proxy thread to handle the request.

Constructor Summary

Daemon(int port, ProxyControl target)
Create a new Daemon with the specified port and target.
Daemon(int port, ProxyControl target, Class proxyClass)
Create a new Daemon with the specified port and target, using the specified class to handle individual requests.

Method Summary

void
run()
Listen on the daemon port and handle incoming requests.
void
stopServer()
Stop the proxy daemon.

Constructor Details

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.

Daemon

public Daemon(int port,
              ProxyControl target,
              Class 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 the Proxy class or a subclass.

Method Details

run

public void run()

stopServer

public void stopServer()
Stop the proxy daemon. The daemon may not stop immediately. see #ACCEPT_TIMEOUT

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