net.grinder.messages.console
Class WorkerProcessReportMessage

java.lang.Object
  extended by net.grinder.messages.console.WorkerProcessReportMessage
All Implemented Interfaces:
Serializable, ProcessReport, WorkerProcessReport, AddressAwareMessage, Message

public final class WorkerProcessReportMessage
extends Object
implements AddressAwareMessage, WorkerProcessReport

Message for informing the console of worker process status.

Author:
Dirk Feufel, Philip Aston
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.grinder.common.processidentity.ProcessReport
ProcessReport.State, ProcessReport.StateThenNameThenNumberComparator
 
Constructor Summary
WorkerProcessReportMessage(ProcessReport.State finished, short runningThreads, short totalThreads)
          Creates a new WorkerProcessReportMessage instance.
 
Method Summary
 short getMaximumNumberOfThreads()
          Accessor for the maximum number of threads for the process.
 short getNumberOfRunningThreads()
          Accessor for the number of running threads for the process.
 WorkerAddress getProcessAddress()
          Accessor for the process identity.
 ProcessReport.State getState()
          Accessor for the process state.
 WorkerIdentity getWorkerIdentity()
          Accessor for the process identity.
 void setAddress(Address address)
          Set the origin address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkerProcessReportMessage

public WorkerProcessReportMessage(ProcessReport.State finished,
                                  short runningThreads,
                                  short totalThreads)
Creates a new WorkerProcessReportMessage instance.

Parameters:
finished - The process state. See ProcessReport.
totalThreads - The total number of threads.
runningThreads - The number of threads that are still running.
Method Detail

setAddress

public void setAddress(Address address)
                throws CommunicationException
Set the origin address.

Specified by:
setAddress in interface AddressAwareMessage
Parameters:
address - The address.
Throws:
CommunicationException - If the address is not valid for this message type.

getProcessAddress

public WorkerAddress getProcessAddress()
Accessor for the process identity.

Specified by:
getProcessAddress in interface ProcessReport
Returns:
The process identity.

getWorkerIdentity

public WorkerIdentity getWorkerIdentity()
Accessor for the process identity.

Specified by:
getWorkerIdentity in interface WorkerProcessReport
Returns:
The process identity.

getState

public ProcessReport.State getState()
Accessor for the process state.

Specified by:
getState in interface ProcessReport
Returns:
The process state.

getNumberOfRunningThreads

public short getNumberOfRunningThreads()
Accessor for the number of running threads for the process.

Specified by:
getNumberOfRunningThreads in interface WorkerProcessReport
Returns:
The number of running threads.

getMaximumNumberOfThreads

public short getMaximumNumberOfThreads()
Accessor for the maximum number of threads for the process.

Specified by:
getMaximumNumberOfThreads in interface WorkerProcessReport
Returns:
The maximum number of threads for the process.


Copyright © 2000-2013. All Rights Reserved.