org.apache.wicket.threadtest.tester
Class Tester

java.lang.Object
  extended by org.apache.wicket.threadtest.tester.Tester
All Implemented Interfaces:
CommandRunner.CommandRunnerObserver

public final class Tester
extends Object
implements CommandRunner.CommandRunnerObserver

Author:
eelcohillenius

Constructor Summary
Tester(Command command, int numberOfThreads, boolean multipleSessions)
          Construct.
Tester(List<Command> commands, int numberOfThreads, boolean multipleSessions)
          Construct.
 
Method Summary
 String getHost()
          Gets host.
 int getPort()
          Gets port.
static void main(String[] args)
          Main method for just starting the server
 void onDone(CommandRunner runner)
           
 void onError(CommandRunner runner, Exception e)
           
 void run()
          Runs the test.
 void setHost(String host)
          Sets host.
 void setPort(int port)
          Sets port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tester

public Tester(Command command,
              int numberOfThreads,
              boolean multipleSessions)
Construct.

Parameters:
command - Command to execute
numberOfThreads - Number of threads to run the commands. Each thread runs all commands
multipleSessions - if true, each thread will represent a seperate session. If false, the test behaves like one client issuing multiple concurrent requests

Tester

public Tester(List<Command> commands,
              int numberOfThreads,
              boolean multipleSessions)
Construct.

Parameters:
commands - Commands to execute
numberOfThreads - Number of threads to run the commands. Each thread runs all commands
multipleSessions - if true, each thread will represent a separate session. If false, the test behaves like one client issuing multiple concurrent requests
Method Detail

main

public static void main(String[] args)
Main method for just starting the server

Parameters:
args -

getHost

public String getHost()
Gets host.

Returns:
host

getPort

public int getPort()
Gets port.

Returns:
port

onDone

public void onDone(CommandRunner runner)
Specified by:
onDone in interface CommandRunner.CommandRunnerObserver

onError

public void onError(CommandRunner runner,
                    Exception e)
Specified by:
onError in interface CommandRunner.CommandRunnerObserver

run

public void run()
         throws Exception
Runs the test.

Throws:
Exception

setHost

public void setHost(String host)
Sets host.

Parameters:
host - host

setPort

public void setPort(int port)
Sets port.

Parameters:
port - port


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.