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
 
  
  -  
	COMMENTLEN_SIZE
   -  
  
 -  
	COMMENT_PREFIX
   -  
  
 -  
	ClassPath
   -  
  
 -  
	IDLEN_SIZE
   -  
  
 -  
	ID_PREFIX
   -  
  
 -  
	LOADLEN_SIZE
   -  
  
 -  
	PREFIX_SIZE
   -  
  
 -  
	PRICELEN_SIZE
   -  
  
 -  
	PRICE_PREFIX
   -  
  
 -  
	RESULT_PREFIX
   -  
  
 -  
	SERVERLEN_SIZE
   -  
  
 -  
	SERVER_PREFIX
   -  
  
 -  
	URLLEN_SIZE
   -  
  
 -  
	URL_PREFIX
   -  
  
 -  
	comment
   -  
  
 -  
	price
   -  
  
 -  
	server
   -  
  
 -  
	sid
   -  
  
 -  
	theURL
   -  
 
  
  -  
	ResultMessage()
   -  
  
 -  
	ResultMessage(String, String, int, String, String)
   -  
 
  
  -  
	createMessage()
   -  Create the message byte array using the public instance
variables:
  sid
  comment
  price
  theURL
  server
that must already have been filled in.
  
 -  
	parse(byte[], int)
   -  Parse the ResultsMessage passed in as a byte array.
 
  
PREFIX_SIZE
  public final static int PREFIX_SIZE
LOADLEN_SIZE
  public final static int LOADLEN_SIZE
IDLEN_SIZE
  public final static int IDLEN_SIZE
PRICELEN_SIZE
  public final static int PRICELEN_SIZE
URLLEN_SIZE
  public final static int URLLEN_SIZE
COMMENTLEN_SIZE
  public final static int COMMENTLEN_SIZE
SERVERLEN_SIZE
  public final static int SERVERLEN_SIZE
ClassPath
  public final static String ClassPath
ID_PREFIX
  public final static String ID_PREFIX
PRICE_PREFIX
  public final static String PRICE_PREFIX
COMMENT_PREFIX
  public final static String COMMENT_PREFIX
URL_PREFIX
  public final static String URL_PREFIX
RESULT_PREFIX
  public final static String RESULT_PREFIX
SERVER_PREFIX
  public final static String SERVER_PREFIX
sid
  public String sid
comment
  public String comment
price
  public int price
theURL
  public String theURL
server
  public String server
  
ResultMessage
  public ResultMessage()
ResultMessage
  public ResultMessage(String AgentID,
                       String u,
                       int p,
                       String c,
                       String srv)
  
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.
  
  
 
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