Class agent.util.ResultMessage
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class agent.util.ResultMessage

java.lang.Object
   |
   +----agent.util.Message
           |
           +----agent.util.ResultMessage

public class ResultMessage
extends Message
A results message, sent from running Agent back to AgentLauncher and containing a URL that holds the results of the Agent's work. // Format of the results command: // The command Resu 4 bytes // The length 10 bytes ascii int // The arguments ID // Field hdr ID__ 4 bytes // length 4 bytes ascii int // ID data length bytes URL // Field hdr URL_ 4 bytes // The length 4 bytes // The URL data length bytes Price // Field hdr Pric_ 4 bytes // length 4 bytes ascii int // Price data length bytes Comment // Field hdr Comm_ 4 bytes // length 4 bytes ascii int // Comment data length bytes Server name // Field hdr Srv_ 4 bytes // The length 4 bytes // The Server data length bytes
See Also:
Message

Variable Index

 o COMMENTLEN_SIZE
 o COMMENT_PREFIX
 o ClassPath
 o IDLEN_SIZE
 o ID_PREFIX
 o LOADLEN_SIZE
 o PREFIX_SIZE
 o PRICELEN_SIZE
 o PRICE_PREFIX
 o RESULT_PREFIX
 o SERVERLEN_SIZE
 o SERVER_PREFIX
 o URLLEN_SIZE
 o URL_PREFIX
 o comment
 o price
 o server
 o sid
 o theURL

Constructor Index

 o ResultMessage()
 o ResultMessage(String, String, int, String, String)

Method Index

 o createMessage()
Create the message byte array using the public instance variables: sid comment price theURL server that must already have been filled in.
 o parse(byte[], int)
Parse the ResultsMessage passed in as a byte array.

Variables

 o PREFIX_SIZE
  public final static int PREFIX_SIZE
 o LOADLEN_SIZE
  public final static int LOADLEN_SIZE
 o IDLEN_SIZE
  public final static int IDLEN_SIZE
 o PRICELEN_SIZE
  public final static int PRICELEN_SIZE
 o URLLEN_SIZE
  public final static int URLLEN_SIZE
 o COMMENTLEN_SIZE
  public final static int COMMENTLEN_SIZE
 o SERVERLEN_SIZE
  public final static int SERVERLEN_SIZE
 o ClassPath
  public final static String ClassPath
 o ID_PREFIX
  public final static String ID_PREFIX
 o PRICE_PREFIX
  public final static String PRICE_PREFIX
 o COMMENT_PREFIX
  public final static String COMMENT_PREFIX
 o URL_PREFIX
  public final static String URL_PREFIX
 o RESULT_PREFIX
  public final static String RESULT_PREFIX
 o SERVER_PREFIX
  public final static String SERVER_PREFIX
 o sid
  public String sid
 o comment
  public String comment
 o price
  public int price
 o theURL
  public String theURL
 o server
  public String server

Constructors

 o ResultMessage
  public ResultMessage()
 o ResultMessage
  public ResultMessage(String AgentID,
                       String u,
                       int p,
                       String c,
                       String srv)

Methods

 o parse
  public void parse(byte b[],
                    int currentOffset)
Parse the ResultsMessage passed in as a byte array. Simply fills in the public instance variables: sid comment price theURL server which the caller can then use as he sees fit.
Parameters:
b - The array of bytes containing ResultsMessage data.
currentOffset - The offset of the SECOND field in the message, i.e. the first Results-specific field. We've already parsed the message type field, that's how we got here.
 o createMessage
  public void createMessage()
Create the message byte array using the public instance variables: sid comment price theURL server that must already have been filled in. When this method is through, the byte array msg is ready to be sent over the net.
Overrides:
createMessage in class Message

All Packages  Class Hierarchy  This Package  Previous  Next  Index