net.grinder.console.communication
Interface ProcessControl

All Known Implementing Classes:
ProcessControlImplementation

public interface ProcessControl

Interface for issuing commands to the agent and worker processes.

Author:
Philip Aston, Dirk Feufel

Nested Class Summary
static interface ProcessControl.Listener
          Listener interface for receiving updates about process status.
static interface ProcessControl.ProcessReports
          Interface to the information the console has about an agent and its worker processes.
static class ProcessControl.ProcessReportsComparator
          Comparator for ProcessControl.ProcessReports that sorts according to the agent report.
 
Method Summary
 void addProcessStatusListener(ProcessControl.Listener listener)
          Add a listener for process status data.
 int getNumberOfLiveAgents()
          How many agents are live?
 void resetWorkerProcesses()
          Signal the worker processes to reset.
 void startWorkerProcesses(GrinderProperties properties)
          Signal the worker processes to start.
 void startWorkerProcessesWithDistributedFiles(Directory distributionDirectory, GrinderProperties properties)
          A variant of startWorkerProcesses(net.grinder.common.GrinderProperties) that checks the properties are reasonable for the distribution directory, and adjusts the supplied properties to have the appropriate relative paths.
 void stopAgentAndWorkerProcesses()
          Signal the agent and worker processes to stop.
 

Method Detail

startWorkerProcesses

void startWorkerProcesses(GrinderProperties properties)
Signal the worker processes to start.

Parameters:
properties - Properties that override the agent's local properties.

startWorkerProcessesWithDistributedFiles

void startWorkerProcessesWithDistributedFiles(Directory distributionDirectory,
                                              GrinderProperties properties)
                                              throws ConsoleException
A variant of startWorkerProcesses(net.grinder.common.GrinderProperties) that checks the properties are reasonable for the distribution directory, and adjusts the supplied properties to have the appropriate relative paths.

Parameters:
distributionDirectory - The distribution directory.
properties - The properties. If the associated file is in the distribution, the agent doesn't reload the distributed copy. However,it uses its location to resolve any relative grinder.script path.
Throws:
ConsoleException - If the grinder.script property is set to a relative path outside of the distribution directory (e.g. ../foo.py.
ConsoleException - If an error occurred calculating file paths.
Since:
3.11

resetWorkerProcesses

void resetWorkerProcesses()
Signal the worker processes to reset.


stopAgentAndWorkerProcesses

void stopAgentAndWorkerProcesses()
Signal the agent and worker processes to stop.


addProcessStatusListener

void addProcessStatusListener(ProcessControl.Listener listener)
Add a listener for process status data.

Parameters:
listener - The listener.

getNumberOfLiveAgents

int getNumberOfLiveAgents()
How many agents are live?

Returns:
The number of agents.


Copyright © 2000-2013. All Rights Reserved.