|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.agent.conversation.lightweight.LightweightConversationImpl
This class is an lighter alternative implementation to the heavy ConversationImpl. Functionality is also more limited, protocols are not enforced, although there is intention for doing this in the future. All use that depends on the protocol enforcing missing will be working as a side effect only.
Field Summary | |
protected AgentID |
_agent_id
Agent-id of the Agent to whom this belongs |
protected java.lang.String |
_agent_name
Agent-name of the Agent to whom this Conversation object belongs |
protected java.lang.String |
_protocol
Name of the protocol this conversation is following |
static int |
AGENT_ACTION_REQ
Conversation requires Agent interaction |
static int |
CONVERSATION_END
Conversation has ended |
static int |
NO_AGENT_ACTION_REQ
Conversation requires no Agent interaction |
static int |
WAIT_BEFORE_END
Wait for response before ending conversation |
Constructor Summary | |
LightweightConversationImpl()
This consctructor creates a new LightweightConversationImpl object. |
|
LightweightConversationImpl(java.lang.String protocol,
AgentID agent_id)
|
Method Summary | |
java.lang.Object |
clone()
Clone method to make duplicates of this Conversation object |
ACL |
getACL(int index)
Pass-back the latest message in this conversation. |
java.lang.String |
getConversationID()
Returns the conversation id for this conversation. |
Envelope |
getEnvelope(int index)
Get the Envelope of a message received. |
ACL |
getFilledInACL()
Method to produce a filled in ACL - e.g. |
ACLMessage |
getFilledInMessage()
Deprecated. The ACL object should be used in favour of the ACLMessage object, hence the getFilledInACL() should be used in preference to this |
int |
getLatestMessageIndex()
Pass back the index of the latest message in the conversation. |
java.util.List |
getNextMessages()
Method to discover what types of messages can be sent next. |
java.util.List |
getNextPerformatives()
Method to discover what performatives are allowed next in the protocol. |
java.lang.String |
getObjectID()
Gets the conversation ID of the conversation. |
java.lang.String |
getProtocol()
Method to get the protocol this Conversation is following. |
java.lang.String |
getSender(int index)
Gets the sender of the message at the specified index. |
AgentID |
getSenderAID(int index)
Gets the sender of the message at the specified index |
int |
getState()
Method to retrieve the state of the conversation (e.g. |
long |
getTimeOut()
Method to get the time at which the last message will time out |
long |
getTimeStamp(int index)
Method to retrieve the time stamp of a given message |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AgentID _agent_id
protected java.lang.String _agent_name
protected java.lang.String _protocol
public static final int AGENT_ACTION_REQ
public static final int CONVERSATION_END
public static final int NO_AGENT_ACTION_REQ
public static final int WAIT_BEFORE_END
Constructor Detail |
public LightweightConversationImpl()
public LightweightConversationImpl(java.lang.String protocol, AgentID agent_id)
Method Detail |
public int getLatestMessageIndex()
getLatestMessageIndex
in interface Conversation
public ACL getACL(int index)
getACL
in interface Conversation
index
- index of the message in the message listpublic Envelope getEnvelope(int index)
getEnvelope
in interface Conversation
index
- index of the message the envelope belongs topublic java.lang.String getSender(int index)
getSender
in interface Conversation
index
- The index of the message to retrievepublic java.lang.String getConversationID()
getConversationID
in interface Conversation
public ACL getFilledInACL()
getFilledInACL
in interface Conversation
public ACLMessage getFilledInMessage()
public java.util.List getNextMessages()
getNextMessages
in interface Conversation
public java.util.List getNextPerformatives()
getNextPerformatives
in interface Conversation
public java.lang.String getObjectID()
getObjectID
in interface DatabaseObject
public java.lang.String getProtocol()
getProtocol
in interface Conversation
public AgentID getSenderAID(int index)
getSenderAID
in interface Conversation
index
- The index of the message to retrievepublic int getState()
getState
in interface Conversation
public long getTimeOut()
getTimeOut
in interface Conversation
public long getTimeStamp(int index)
getTimeStamp
in interface Conversation
index
- The index of the message for which to retrieve the timestamppublic java.lang.Object clone()
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- Thrown if the object cannot be cloned
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |