All Packages Class Hierarchy This Package Previous Next Index
Class kraft.monitor.adapter.Kraft_msg
java.lang.Object
|
+----kraft.monitor.adapter.Kraft_msg
- public class Kraft_msg
- extends Object
- implements Message
Represents a kraft_msg/2 term as an object that is
recognised as a Message by the Monitor.
Parses a (string) term structure into context and core as shown
below:
kraft_msg( context , Core), Core= ccql(Perf, [sender:agent1,...])
The core of the message is parsed as a CCQL object.
- Author:
- Ted Francis
- See Also:
- CCQL, Message
-
receiver
- Field extracted from the context of the message
-
sender
- Field extracted from the context of the message
-
time_stamp
- Field extracted from the context of the message
-
Kraft_msg(String)
- Construct a new kraft_msg object from the given
string.
-
Kraft_msg(TermInString)
- Construct a new kraft_msg object from the given
Term
-
equals(Object)
- Whether obj represents the same message as this one
-
getCommandString()
- Returns the performative of the CCQL part of the message
-
getContext()
- Return the context of the message as a string
-
getCore()
- Return the Core of the message as CCQL object
-
getDisplayString(int)
- Format the message into a string for displaying
-
toString()
- Returns the whole kraft_msg as a simple string
sender
public String sender
- Field extracted from the context of the message
receiver
public String receiver
- Field extracted from the context of the message
time_stamp
public String time_stamp
- Field extracted from the context of the message
Kraft_msg
public Kraft_msg(String str) throws Exception
- Construct a new kraft_msg object from the given
string. This must be a prolog term structure represented
as string.
- Throws: Exception
- If the string is not valid kraft_msg term.
Kraft_msg
public Kraft_msg(TermInString term) throws Exception
- Construct a new kraft_msg object from the given
Term
- Throws: Exception
- If the term is not a valid kraft_msg term
getCore
public CCQL getCore()
- Return the Core of the message as CCQL object
getContext
public String getContext()
- Return the context of the message as a string
getCommandString
public String getCommandString()
- Returns the performative of the CCQL part of the message
toString
public String toString()
- Returns the whole kraft_msg as a simple string
- Overrides:
- toString in class Object
getDisplayString
public String getDisplayString(int detail)
- Format the message into a string for displaying
- Parameters:
- detail - if 1, displays CCQL.getDisplayString().
if 2, displays context + CCQL.getDisplayString().
- See Also:
- getDisplayString
equals
public boolean equals(Object obj)
- Whether obj represents the same message as this one
- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index