com.sun.slamd.server
Class RealTimeStatHandler

java.lang.Object
  extended bycom.sun.slamd.server.RealTimeStatHandler

public class RealTimeStatHandler
extends java.lang.Object

This class implements a mechanism for handling statistical data reported to the SLAMD server in real time. It aggregates the data reported by all the clients and can make it available for display to end users on request.


Constructor Summary
RealTimeStatHandler(SLAMDServer slamdServer)
          Creates a new instance of this real-time stat handler.
 
Method Summary
 SLAMDServer getSLAMDServer()
          Retrieves the reference to the SLAMD server with which this stat handler is associated.
 void handleRegisterStatMessage(RegisterStatisticMessage message)
          Handles the work of registering a client with the SLAMD server for the purpose of real-time statistics reporting.
 void handleReportStatMessage(ReportStatisticMessage message)
          Handles the work of processing the statistical data contained in the provided message and making it available to the server.
 void removeJobStatsUnlocked(java.lang.String jobID)
          Removes the real-time stat data for the specified job from this stat handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealTimeStatHandler

public RealTimeStatHandler(SLAMDServer slamdServer)
Creates a new instance of this real-time stat handler.

Parameters:
slamdServer - The SLAMD server with which this stat handler is associated.
Method Detail

getSLAMDServer

public SLAMDServer getSLAMDServer()
Retrieves the reference to the SLAMD server with which this stat handler is associated.

Returns:
The reference to the SLAMD server with which this stat handler is associated.

handleRegisterStatMessage

public void handleRegisterStatMessage(RegisterStatisticMessage message)
Handles the work of registering a client with the SLAMD server for the purpose of real-time statistics reporting.

Parameters:
message - The message containing the information about the client being registered.

handleReportStatMessage

public void handleReportStatMessage(ReportStatisticMessage message)
Handles the work of processing the statistical data contained in the provided message and making it available to the server.

Parameters:
message - The message containing the statistical data to be reported.

removeJobStatsUnlocked

public void removeJobStatsUnlocked(java.lang.String jobID)
Removes the real-time stat data for the specified job from this stat handler. Note that this method does not do any locking and assumes that the stat hash lock is already held by the thread calling this method.

Parameters:
jobID - The job ID of the job for which to remove the data from this stat handler.