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

Class agent.util.AgentListMessage

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

public class AgentListMessage
extends Message
A message that supplies the receiver with a list of dispatchable agents available on this server. It is sent in response to a QueryAgentListMessage. Message format: Description Data Length The command Load 4 bytes The length 10 bytes ascii int filename FNam 4 bytes length 4 bytes ascii int filename length bytes description Desc 4 bytes length 4 bytes ascii int description length bytes Class contains both message construction and message parsing methods.
See Also:
QueryAgentListMessage, Message

Variable Index

 o ALSTLEN_SIZE
 o ALST_PREFIX
 o DESCLEN_SIZE
 o DESC_PREFIX
 o FNAMLEN_SIZE
 o FNAM_PREFIX
 o PREFIX_SIZE
 o descriptions
 o filenames

Constructor Index

 o AgentListMessage()
 o AgentListMessage(Vector, Vector)
This is the constructor used by an AgentServer that wishes to SEND a AgentList message.

Method Index

 o createMessage()
Actually fill the byte array 'msg' with ALL the bytes that make up this load message.
 o parse(byte[], int)
parse the supplied byte array as if it were an AgentList message.

Variables

 o PREFIX_SIZE
  public final static int PREFIX_SIZE
 o ALST_PREFIX
  public final static String ALST_PREFIX
 o FNAM_PREFIX
  public final static String FNAM_PREFIX
 o DESC_PREFIX
  public final static String DESC_PREFIX
 o ALSTLEN_SIZE
  public final static int ALSTLEN_SIZE
 o FNAMLEN_SIZE
  public final static int FNAMLEN_SIZE
 o DESCLEN_SIZE
  public final static int DESCLEN_SIZE
 o filenames
  public Vector filenames
 o descriptions
  public Vector descriptions

Constructors

 o AgentListMessage
  public AgentListMessage()
 o AgentListMessage
  public AgentListMessage(Vector fnames,
                          Vector descs)
This is the constructor used by an AgentServer that wishes to SEND a AgentList message. Supply the name of the lead class, the id, the signature, arguments, dispatching server and port.

Methods

 o parse
  public void parse(byte b[],
                    int currentOffset)
parse the supplied byte array as if it were an AgentList message. Start parsing at the supplied currentOffset. currentOffset should point to the FIRST byte of the SECOND field in a message, i.e. to the first character in the word "FNam". Fills the instance variables: filenames descriptions with data from the message.
 o createMessage
  public void createMessage()
Actually fill the byte array 'msg' with ALL the bytes that make up this load message. Expects the intance variables: filenames descriptions to already be filled with valid data.
Overrides:
createMessage in class Message

All Packages  Class Hierarchy  This Package  Previous  Next  Index