com.sun.slamd.message
Class ReportStatisticMessage

java.lang.Object
  extended bycom.sun.slamd.message.Message
      extended bycom.sun.slamd.message.ReportStatisticMessage

public class ReportStatisticMessage
extends Message

This class defines a message that clients will use to report statistics to the SLAMD server's real-time stat colleciton facility.


Field Summary
 
Fields inherited from class com.sun.slamd.message.Message
ASN1_TYPE_CLASS_TRANSFER_REQUEST, ASN1_TYPE_CLASS_TRANSFER_RESPONSE, ASN1_TYPE_CLIENT_HELLO, ASN1_TYPE_CLIENT_MANAGER_HELLO, ASN1_TYPE_HELLO_RESPONSE, ASN1_TYPE_JOB_COMPLETED, ASN1_TYPE_JOB_CONTROL_REQUEST, ASN1_TYPE_JOB_CONTROL_RESPONSE, ASN1_TYPE_JOB_REQUEST, ASN1_TYPE_JOB_RESPONSE, ASN1_TYPE_KEEPALIVE, ASN1_TYPE_REGISTER_STAT, ASN1_TYPE_REPORT_STAT, ASN1_TYPE_SERVER_HELLO, ASN1_TYPE_SERVER_SHUTDOWN, ASN1_TYPE_START_CLIENT_REQUEST, ASN1_TYPE_START_CLIENT_RESPONSE, ASN1_TYPE_STATUS_REQUEST, ASN1_TYPE_STATUS_RESPONSE, ASN1_TYPE_STOP_CLIENT_REQUEST, ASN1_TYPE_STOP_CLIENT_RESPONSE, messageID
 
Constructor Summary
ReportStatisticMessage(int messageID, java.lang.String jobID, ASN1Sequence[] dataSequences)
          Creates a new report statistic message with the provided information.
 
Method Summary
static ReportStatisticMessage decodeReportStatMessage(int messageID, ASN1Element element)
          Decodes the provided ASN.1 element as a report statistic message.
 ASN1Element encode()
          Encodes this message into an ASN.1 element.
 ASN1Sequence[] getDataSequences()
          Retrieves the ASN.1 sequences containing the data to be reported.
 java.lang.String getJobID()
          Retrieves the job ID of the job with which this data is associated.
 java.lang.String toString()
          Retrieves a string representation of this message.
 
Methods inherited from class com.sun.slamd.message.Message
decode, getMessageID, getMessageType, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReportStatisticMessage

public ReportStatisticMessage(int messageID,
                              java.lang.String jobID,
                              ASN1Sequence[] dataSequences)
Creates a new report statistic message with the provided information.

Parameters:
messageID - The message ID to use for this message.
jobID - The job ID with which this data is associated.
dataSequences - The ASN.1 sequences containing the data to be reported.
Method Detail

getJobID

public java.lang.String getJobID()
Retrieves the job ID of the job with which this data is associated.

Returns:
The job ID of the job with which this data is associated.

getDataSequences

public ASN1Sequence[] getDataSequences()
Retrieves the ASN.1 sequences containing the data to be reported.

Returns:
The ASN.1 sequences containing the data to be reported.

toString

public java.lang.String toString()
Retrieves a string representation of this message.

Overrides:
toString in class Message
Returns:
A string representation of this message.

decodeReportStatMessage

public static ReportStatisticMessage decodeReportStatMessage(int messageID,
                                                             ASN1Element element)
                                                      throws SLAMDException
Decodes the provided ASN.1 element as a report statistic message.

Parameters:
messageID - The message ID to use for this message.
element - The ASN.1 element containing the ReportStat sequence.
Returns:
The report statistic message decoded from the ASN.1 element.
Throws:
SLAMDException - If the provided ASN.1 element cannot be decoded as a report statistic message.

encode

public ASN1Element encode()
Encodes this message into an ASN.1 element. A report statistic message has the following ASN.1 syntax:

ReportStat ::= [APPLICATION 20] SEQUENCE {
jobID OCTET STRING,
dataSequence SEQUENCE OF SEQUENCE }

Specified by:
encode in class Message
Returns:
An ASN.1 encoded representation of this message.