kaos.core.util
Class MsgUtils

java.lang.Object
  extended by kaos.core.util.MsgUtils

public class MsgUtils
extends java.lang.Object

$Revision: 1.5 $


Constructor Summary
MsgUtils()
           
 
Method Summary
static AclMessage createAclMessage(AcrAgentName senderName, AcrAgentName receiverName, java.lang.String fipaPerformative, java.lang.Object msgContent)
           
static AcrPayload createPayload(AcrAgentName senderName, AcrAgentName receiverName, java.lang.String fipaPerformative, java.lang.Object msg)
           
static AclMessage getAclMessage(TransportMessage msg)
           
static boolean getBoolean(java.lang.String boolStr)
           
static Msg unwrapMsgContent(TransportMessage tMsg)
           
static java.lang.Object unwrapObjectContent(TransportMessage tMsg)
          This method is more general than the unwrapMsgContent method.
static java.lang.String unwrapStringContent(TransportMessage tMsg)
           
static TransportMessage wrapMsg(Locator sender, Locator receiver, java.lang.Object msg)
          Utility function to wrap a KAoS Msg in a TransportMsg
static TransportMessage wrapObject(Locator sender, Locator receiver, java.lang.String senderName, java.lang.String receiverName, java.lang.String fipaPerformative, java.lang.Object msg)
          Utility function to wrap an Object in a TransportMsg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsgUtils

public MsgUtils()
Method Detail

getBoolean

public static boolean getBoolean(java.lang.String boolStr)

wrapMsg

public static TransportMessage wrapMsg(Locator sender,
                                       Locator receiver,
                                       java.lang.Object msg)
Utility function to wrap a KAoS Msg in a TransportMsg


wrapObject

public static TransportMessage wrapObject(Locator sender,
                                          Locator receiver,
                                          java.lang.String senderName,
                                          java.lang.String receiverName,
                                          java.lang.String fipaPerformative,
                                          java.lang.Object msg)
Utility function to wrap an Object in a TransportMsg. Currently, the Object can be an instance of a Msg class or String.


createPayload

public static AcrPayload createPayload(AcrAgentName senderName,
                                       AcrAgentName receiverName,
                                       java.lang.String fipaPerformative,
                                       java.lang.Object msg)

createAclMessage

public static AclMessage createAclMessage(AcrAgentName senderName,
                                          AcrAgentName receiverName,
                                          java.lang.String fipaPerformative,
                                          java.lang.Object msgContent)

unwrapMsgContent

public static Msg unwrapMsgContent(TransportMessage tMsg)

unwrapObjectContent

public static java.lang.Object unwrapObjectContent(TransportMessage tMsg)
This method is more general than the unwrapMsgContent method. Originally, only instances of Msg were sent via the TransportMessage. The introduction of PolicyCertificates wrapping Msgs created a need for this method.


unwrapStringContent

public static java.lang.String unwrapStringContent(TransportMessage tMsg)

getAclMessage

public static AclMessage getAclMessage(TransportMessage msg)