fipaos.agent.conversation
Interface ConversationManager

All Known Implementing Classes:
LightweightConversationManagerImpl, ConversationManagerImpl

public interface ConversationManager
extends MessageReceiver, MessageSender

This interface should be implemented by all CM implementations.


Method Summary
 ConversationaddConversation(String protocol)
          Method to create a new conversation given a protcol, and add it to the active list
 booleanaddProtocol(String protocol_name, 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.
 ConversationgetConversation(String conversation_id)
          Retrieves an active/previous Conversation that an Agent has had
 booleanhasActiveConversations()
          Indicates whether an Agent has any conversations in active state
 booleanhasProtocol(String protocol)
          Indicates whether the specified protocol is already in the cache, i.e.
 voidremoveConversation(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.MessageReceiver
receiveMessage, setMessageSender

Methods inherited from interface fipaos.mts.MessageSender
sendMessage, setMessageReceiver, shutdown

Method Detail

addConversation

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

addProtocol

public boolean addProtocol(String protocol_name, 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

getConversation

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

hasActiveConversations

public boolean hasActiveConversations()
Indicates whether an Agent has any conversations in active state
Returns: True is there are conversations is active state, false otherwise

hasProtocol

public boolean hasProtocol(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

removeConversation

public void removeConversation(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