fipaos.agent.conversation
Interface ConversationManager

All Superinterfaces:
MessageReceiver, MessageSender
All Known Implementing Classes:
LightweightConversationManagerImpl, ConversationManagerImpl

public interface ConversationManager
extends MessageSender, MessageReceiver

This interface should be implemented by all CM implementations.


Method Summary
 Conversation addConversation(java.lang.String protocol)
          Method to create a new conversation given a protcol, and add it to the active list
 boolean addProtocol(java.lang.String protocol_name, java.lang.String protocol_defn)
          Adds a new protocol to the CM - the CM will attempt to learn the protocol and will cache it for future use.
 Conversation getConversation(java.lang.String conversation_id)
          Retrieves an active/previous Conversation that an Agent has had
 boolean hasProtocol(java.lang.String protocol)
          Indicates whether the specified protocol is already in the cache, i.e.
 void removeConversation(java.lang.String id)
          Removes the given conversation from the ConversationManager - this may be necessary in order to end conversations that have no defined end-point
 
Methods inherited from interface fipaos.mts.MessageSender
sendMessage, setMessageReceiver, shutdown
 
Methods inherited from interface fipaos.mts.MessageReceiver
receiveMessage, setMessageSender
 

Method Detail

addConversation

public Conversation addConversation(java.lang.String protocol)
                             throws UnknownProtocolException
Method to create a new conversation given a protcol, and add it to the active list

getConversation

public Conversation getConversation(java.lang.String conversation_id)
                             throws InvalidConversationIDException
Retrieves an active/previous Conversation that an Agent has had

removeConversation

public void removeConversation(java.lang.String id)
                        throws InvalidConversationIDException
Removes the given conversation from the ConversationManager - this may be necessary in order to end conversations that have no defined end-point
Parameters:
id - The conversation-id of the conversation to remove

addProtocol

public boolean addProtocol(java.lang.String protocol_name,
                           java.lang.String protocol_defn)
Adds a new protocol to the CM - the CM will attempt to learn the protocol and will cache it for future use.
Parameters:
protocol_name - The name of the protocol to store (e.g. fipa-new-protocol)
protocol_defn - The RDF definition of the protocol
Returns:
True if the protocol was learned and stored correctly, false otherwise

hasProtocol

public boolean hasProtocol(java.lang.String protocol)
Indicates whether the specified protocol is already in the cache, i.e. has it already been learned.
Parameters:
protocol - The protocol to check for
Returns:
True if the protocol has already been learned, false otherwise