Agent System POND 1.2 (28.2.2002)

Class ExperienceExchangeConversation

All Implemented Interfaces:
Cloneable, Serializable

public class ExperienceExchangeConversation
extends Conversation

A conversation to exchange experiences. Sends a single statement to all other local agents using a broadcast. Agents might opt to ignore this message and do not add the statement and recalculate their experiences if they are busy. This implementation however does add all statements.

1.0, 1.7.2000
Michael Sonntag
See Also:
PkgAgentSystem.Experiences, Serialized Form

Field Summary
static long conversationTypeID
          The ID for this type of conversation (2).
Fields inherited from class PkgAgentSystem.Conversation
Constructor Summary
ExperienceExchangeConversation(AgentBase myAgent)
          Creates a new conversation for exchanging experiences.
Method Summary
protected  boolean handleMessage(MessageType msg)
          Handles the messages.
 void setStatement(Statement stat)
          Sets the statement to exchange.
Methods inherited from class PkgAgentSystem.Conversation
broadcastMessage, endConversation, fillInConversationData, getAgent, getConversationTypeID, getCounterpartConvID, getCounterpartIdentity, getOwnConvID, isInitiator, isRunning, newConversation, newConversation, sendMessage, setCounterpartConvID, setCounterpartIdentity, setInitiator, setOwnConvID, setShouldArchive, shouldArchive, startConversation, waitEnded
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final long conversationTypeID
The ID for this type of conversation (2).
Constructor Detail


public ExperienceExchangeConversation(AgentBase myAgent)
Creates a new conversation for exchanging experiences.
myAgent - the agent this conversation belongs to
Method Detail


public void setStatement(Statement stat)
Sets the statement to exchange.
stat - the statement to tell all other local agents (must be provided)


protected boolean handleMessage(MessageType msg)
Handles the messages. Calls super.handleMessage(msg) first.
The sender broadcasts the statement to all other agents. If the statement was not set before starting the conversation, an error occurs. The conversation is terminated in any case and not archived.
The recipient adds this statement to its own experiences and then terminates the conversation, which is not archived.
handleMessage in class Conversation
msg - the msg to handle
true if the message was handled (in this conversation all messages are handled, so always returns true)

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.