jade.domain.introspection
Class PostedMessage

java.lang.Object
  extended by jade.domain.introspection.PostedMessage
All Implemented Interfaces:
Concept, Term, Event, java.io.Serializable

public class PostedMessage
extends java.lang.Object
implements Event

An introspection event, recording the posting of an ACL message within the platform.

Version:
$Date: 2010-06-11 15:32:31 +0200 (ven, 11 giu 2010) $ $Revision: 6352 $
Author:
Giovanni Rimassa - Universita' di Parma
See Also:
Serialized Form

Field Summary
static java.lang.String NAME
          A string constant for the name of this event.
 
Constructor Summary
PostedMessage()
          Default constructor.
 
Method Summary
 ACLMessage getMessage()
          Retrieve the value of the message slot of this event, containing the ACL message that was posted to the receiver agent message queue.
 java.lang.String getName()
          Retrieve the name of this event.
 AID getReceiver()
          Retrieve the value of the receiver slot of this event, containing the agent identifier of the agent owning the message queue the message was posted to.
 AID getSender()
          Retrieve the value of the sender slot of this event, containing the agent identifier of the agent that sent the message.
 void setMessage(ACLMessage msg)
          Set the message slot of this event.
 void setReceiver(AID id)
          Set the receiver slot of this event.
 void setSender(AID id)
          Set the sender slot of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
A string constant for the name of this event.

See Also:
Constant Field Values
Constructor Detail

PostedMessage

public PostedMessage()
Default constructor. A default constructor is necessary for ontological classes.

Method Detail

getName

public java.lang.String getName()
Retrieve the name of this event.

Specified by:
getName in interface Event
Returns:
A constant value for the event name.

setSender

public void setSender(AID id)
Set the sender slot of this event.

Parameters:
id - The agent identifier of the agent that sent the message.

getSender

public AID getSender()
Retrieve the value of the sender slot of this event, containing the agent identifier of the agent that sent the message.

Returns:
The value of the sender slot, or null if no value was set.

setMessage

public void setMessage(ACLMessage msg)
Set the message slot of this event.

Parameters:
msg - The ACL message that was posted to the receiver agent message queue.

getMessage

public ACLMessage getMessage()
Retrieve the value of the message slot of this event, containing the ACL message that was posted to the receiver agent message queue.

Returns:
The value of the message slot, or null if no value was set.

setReceiver

public void setReceiver(AID id)
Set the receiver slot of this event.

Parameters:
id - The agent identifier of the agent owning the message queue the message was posted to.

getReceiver

public AID getReceiver()
Retrieve the value of the receiver slot of this event, containing the agent identifier of the agent owning the message queue the message was posted to.

Returns:
The value of the receiver slot, or null if no value was set.