fipaos.mts
Class Message


public class Message
implements Cloneable, Serializable

Provides an encapsulated entity for the parts which compose an Agent message


Constructor Summary
Message(Envelope env, ACL acl)
          Create a new Message based upon the given Envelope (which is assumed to contain
an ACL object).
Message(ACL msg)
          Creates a Message based upon the given ACL object (automatically generates an
Envelope based upon the ACL object given)

Method Summary
 voidaddMessageListener(MessageListener ml)
          Add a MessageListener to this
 Objectclone()
           
 ACLgetACL()
          Gets the ACL that is part of this Message
 ObjectgetContent()
          Gets the content of this Message
 EnvelopegetEnvelope()
          Gets the Envelope that is part of this Message
 voidremoveMessageListener(MessageListener ml)
          Remove a MessageListener from this
 voidsetEnvelope(Envelope envelope)
          Sets the Envelope that is part of this Message
 StringtoString()
          Convert Message to human-readable form

Constructor Detail

Message

public Message(Envelope env, ACL acl)
Create a new Message based upon the given Envelope (which is assumed to contain
an ACL object).
Parameters:
env - The Envelope to base the Message upon

Message

public Message(ACL msg)
Creates a Message based upon the given ACL object (automatically generates an
Envelope based upon the ACL object given)
Parameters:
msg - ACL object to create the Message from
Method Detail

addMessageListener

public void addMessageListener(MessageListener ml)
Add a MessageListener to this

clone

public Object clone()

getACL

public ACL getACL()
Gets the ACL that is part of this Message
Returns: The ACL part of this message

getContent

public Object getContent()
Gets the content of this Message
Returns: The content of this Message

getEnvelope

public Envelope getEnvelope()
Gets the Envelope that is part of this Message
Returns: The Envelope belonging to this message

removeMessageListener

public void removeMessageListener(MessageListener ml)
Remove a MessageListener from this

setEnvelope

public void setEnvelope(Envelope envelope)
Sets the Envelope that is part of this Message
Parameters:
envelope - The Envelope belonging to this message

toString

public String toString()
Convert Message to human-readable form

Association Links

to Class fipaos.ont.fipa.fipaman.Envelope

to Class fipaos.ont.fipa.ACL

to Class java.lang.Object