All Packages Class Hierarchy This Package Previous Next Index
Interface kraft.monitor.display.Message
- public interface Message
- extends Serializable
Any message object that is passed from one agent to another can be
recognised as such by making that object implement this
interface.
It defines a few methods which must be implemented to ensure that
Messages are treated correctly by the Monitor
This interface also ensures that messages passed to the Monitor
are serializable , so they can be passed remotely by copy
using RMI.
The class CCQL is an example implementation of this
interface.
- Author:
- Ted Francis
- See Also:
- MonitorServer, CCQL, Monitorable
-
equals(Object)
- Must be implemented to ensure comparison for equality with
other Message objects are successful.
-
getCommandString()
- Returns the basic command name of this message.
-
getDisplayString(int)
- Returns a formatted String of the Message which gives more details
of the message in a 'nice' format (with tabs and newlines)
-
toString()
- Gets all printable details of the Message.
getCommandString
public abstract String getCommandString()
- Returns the basic command name of this message.
i.e. would give 'ask-all' in a KQML ask-all performative
getDisplayString
public abstract String getDisplayString(int detail_level)
- Returns a formatted String of the Message which gives more details
of the message in a 'nice' format (with tabs and newlines)
- Parameters:
- detail_level - The level of detail to display the string at
designers should ensure that it returns some value whatever
the value of this parameter. They could also choose to
ignore the value and always return the same string!
toString
public abstract String toString()
- Gets all printable details of the Message.
- Overrides:
- toString in class Object
equals
public abstract boolean equals(Object o)
- Must be implemented to ensure comparison for equality with
other Message objects are successful.
Used when searching through logs of messages
- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index