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 |
Conversation | addConversation(String protocol) Method to create a new conversation given a protcol, and add it to the active list |
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. |
Conversation | getConversation(String conversation_id) Retrieves an active/previous Conversation that an Agent has had |
boolean | hasProtocol(String protocol) Indicates whether the specified protocol is already in the cache, i.e. |
void | removeConversation(String id) Removes the given conversation from the ConversationManager - this may be
necessary in order to end conversations that have no defined end-point |
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
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