utilities
Class KQML

java.lang.Object
  |
  +--utilities.KQML
All Implemented Interfaces:
java.lang.Cloneable

public class KQML
extends java.lang.Object
implements java.lang.Cloneable


Constructor Summary
KQML()
          Boring constructor
KQML(java.lang.String str)
          Parse constructor
 
Method Summary
 void addField(java.lang.String i, java.lang.String v)
          Sets the value of a parameter
 void addFieldValuePair(java.lang.String i, java.lang.String v)
          Deprecated. Use addField
 java.lang.Object clone()
          Clone
 java.lang.String getPerformative()
          Gets the performative value
 java.lang.String getSendString()
          Encodes the actual string data that is to be sent
 java.lang.String getValue(java.lang.String i)
          Returns the value of a parameter
 void parseMessage(java.lang.String str)
          Parses the message into this object
 void removeField(java.lang.String i)
          Removes a parameter
 void setPerformative(java.lang.String p)
          Sets the performative value
 java.lang.String toString()
          Writes us out to a string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KQML

public KQML()
Boring constructor

KQML

public KQML(java.lang.String str)
     throws java.text.ParseException
Parse constructor
Parameters:
str - The KQML message parse
Throws:
java.text.ParseException - Thrown when there is an error parsing the string
See Also:
parseMessage(java.lang.String)
Method Detail

parseMessage

public void parseMessage(java.lang.String str)
                  throws java.text.ParseException
Parses the message into this object
Parameters:
str - The kqml formatted message
Throws:
java.text.ParseException - Thrown when there is an error parsing the string

getValue

public java.lang.String getValue(java.lang.String i)
Returns the value of a parameter
Parameters:
i - The name of the value to query
Returns:
The value, or null if not found

addFieldValuePair

public void addFieldValuePair(java.lang.String i,
                              java.lang.String v)
Deprecated. Use addField

Sets the value of a parameter
Parameters:
i - The name of the value to set
v - The value to set

addField

public void addField(java.lang.String i,
                     java.lang.String v)
Sets the value of a parameter
Parameters:
i - The name of the value to set
v - The value to set

removeField

public void removeField(java.lang.String i)
Removes a parameter
Parameters:
i - The name of the value to remove

getPerformative

public java.lang.String getPerformative()
Gets the performative value
Returns:
The performative

setPerformative

public void setPerformative(java.lang.String p)
Sets the performative value
Parameters:
p - The new performative

getSendString

public java.lang.String getSendString()
Encodes the actual string data that is to be sent
Returns:
The message string

clone

public java.lang.Object clone()
Clone

toString

public java.lang.String toString()
Writes us out to a string
Overrides:
toString in class java.lang.Object
Returns:
A stringification of us