Package spade :: Module ACLMessage :: Class ACLMessage
[hide private]
[frames] | no frames]

Class ACLMessage

source code

ACLMessage class stores a message using the ACL language

Instance Methods [hide private]
 
__init__(self, performative=None) source code
 
reset(self)
resets the object its structures are set to its initial value
source code
 
setSender(self, sender)
set the sender (AID class)
source code
 
getSender(self)
returns the sender (AID class)
source code
 
addReceiver(self, recv)
adds a receiver to the list (AID class)
source code
 
removeReceiver(self, recv)
removes a receiver from the list (AID class)
source code
 
resetReceivers(self)
clears the list of receivers
source code
 
getReceivers(self)
returns the list of reveivers
source code
 
addReplyTo(self, re)
adds a 'reply to' to the list (AID class)
source code
 
removeReplyTo(self, re)
removes a 'reply to' from the list (AID class)
source code
 
getReplyTo(self)
returns a 'reply to' from the list (AID class)
source code
 
setPerformative(self, p)
sets the message performative (string) must be in ACLMessage.commacts
source code
 
getPerformative(self)
returns the message performative (string)
source code
 
setContent(self, c)
sets the message content (string, bytestream, ...)
source code
 
setContentObject(self, co)
sets the message content in ContentObject format
source code
 
getContent(self)
returns the message content
source code
 
getContentObject(self)
returns the message content in ContentObject format, if possible
source code
 
setReplyWith(self, rw) source code
 
getReplyWith(self) source code
 
setInReplyTo(self, reply) source code
 
getInReplyTo(self) source code
 
setEncoding(self, e) source code
 
getEncoding(self) source code
 
setLanguage(self, e) source code
 
getLanguage(self) source code
 
setOntology(self, e) source code
 
getOntology(self) source code
 
setReplyBy(self, e) source code
 
getReplyBy(self) source code
 
setProtocol(self, e) source code
 
getProtocol(self) source code
 
setConversationId(self, e) source code
 
getConversationId(self) source code
 
createReply(self)
Creates a reply for the message Duplicates all the message structures exchanges the 'from' AID with the 'to' AID
source code
 
__str__(self) source code
 
asString(self)
returns a printable version of the message in ACL string representation
source code
 
serialize(self)
returns a serialized version of the message
source code
 
asHTML(self)
returns an HTML version of the message ready to be displayed at the WUI
source code
Class Variables [hide private]
  ACCEPT_PROPOSAL = 'accept-proposal'
  AGREE = 'agree'
  CANCEL = 'cancel'
  CFP = 'cfp'
  CALL_FOR_PROPOSAL = 'call-for-proposal'
  CONFIRM = 'confirm'
  DISCONFIRM = 'disconfirm'
  FAILURE = 'failure'
  INFORM = 'inform'
  NOT_UNDERSTOOD = 'not-understood'
  PROPOSE = 'propose'
  QUERY_IF = 'query-if'
  QUERY_REF = 'query-ref'
  REFUSE = 'refuse'
  REJECT_PROPOSAL = 'reject-proposal'
  REQUEST = 'request'
  REQUEST_WHEN = 'request-when'
  REQUEST_WHENEVER = 'request-whenever'
  SUBSCRIBE = 'subscribe'
  INFORM_IF = 'inform-if'
  PROXY = 'proxy'
  PROPAGATE = 'propagate'
  cid_base = 'NXBm'
  cid_autocount = 0
  a = 3
Instance Variables [hide private]
  commacts
if performative and (performative.lower() in self.commacts):...
  content
self.reply_to = [] self.reply_with = None self.reply_by = None self.in_reply_to = None self.encoding = None self.language = None self.ontology = None self.protocol = None self.conversation_id = str(self.cid_base + str(self.cid_autocount)) self.cid_autocount +=1
Instance Variable Details [hide private]

commacts


if performative and (performative.lower() in self.commacts):
        self.performative = performative.lower()
else: self.performative = None