| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--mam.agent.Agent
Basic Agent class Implements the necessary Agent interface messages from that interface.
Field Summary | |
final static String | AGENT_ACCESS_STATISTICS_TAG_NAME |
final static String | AGENT_PROPERTIES_TAG_NAME |
final static String | AGENT_TRAITS_TAG_NAME |
final static RoutingTag | ALL_AGENTS_ROUTING_TAG |
final static String | DEFAULT_TAG_NAME |
protected AccessStatisticsGroup | m_accessStatisticsGroup |
protected AgentProperties | m_agentProperties |
protected Facility | m_facility |
protected MessageQueue | m_incomingMessageQueue |
protected boolean | m_shutdown |
protected SleepManager | m_sleepManager |
private boolean | m_xmlSerializable |
final static String | ROLE_TAG_NAME |
Fields inherited from class java.lang.Thread |
MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY |
Constructor Summary | |
Agent() Constructor for the Agent object | |
Agent(Facility facility, AgentProperties defaultAgentProperties) Constructor for the Agent object |
Method Summary | |
synchronized void | enqueueMessage(AgentMessage incomingMessage) Description of the Method |
void | fromXmlElement(Element source) Description of the Method |
AccessStatisticsGroup | getAccessStatisticsGroup() Gets the AccessStatisticsGroup attribute of the Agent object |
Account | getAccount() Gets the Account attribute of the Agent object |
AgentProperties | getAgentProperties() Gets the AgentProperties attribute of the Agent object |
AgentTraits | getAgentTraits() Gets the AgentTraits attribute of the Agent object |
String | getDescription() Gets the Description attribute of the Agent object |
protected Facility | getFacility() Gets the Facility attribute of the Agent object |
MamId | getMamId() Gets the MamId attribute of the Agent object |
String | getNickname() Gets the Nickname attribute of the Agent object |
String | getQuote() Gets the Quote attribute of the Agent object |
String | getRole() Gets the Role attribute of the Agent object |
RoutingTag | getRoutingTagToSelf() Gets the RoutingTagToSelf attribute of the Agent object |
boolean | getXmlSerializable() Gets the XmlSerializable attribute of the Agent object |
void | handleDoAgentShutdownMessage(AgentMessage m) Description of the Method |
void | handleGetAccessStatisticsMessage(AgentMessage m) Description of the Method |
void | handleGetAgentPropertiesMessage(AgentMessage m) Description of the Method |
void | handleGetAgentTraitsMessage(AgentMessage m) Message Handling notes: For some reason, the reflection mechanism fails when dealing with protected methods. |
void | handleGetQuoteMessage(AgentMessage m) Description of the Method |
protected void | handleMessages() Generic message handler Override this method to provide custom message handling. |
void | handleSetDescriptionMessage(AgentMessage m) Description of the Method |
void | handleSetNicknameMessage(AgentMessage m) Description of the Method |
protected void | idleActivity() Description of the Method |
protected void | invokeMessageHandler(AgentMessage message) Utility method to use reflection to invoke the standard handler for whatever message is passed. |
protected void | registerRoutingTags() Description of the Method |
boolean | requiresPersistence() Description of the Method |
void | run() A basic message handling loop. |
void | setAccount(Account account) Sets the Account attribute of the Agent object |
void | setAgentTraits(AgentTraits agentTraits) Sets the AgentTraits attribute of the Agent object |
void | setDescription(String description) Sets the Description attribute of the Agent object |
void | setFacility(Facility localFacility) Sets the Facility attribute of the Agent object |
void | setMamId(MamId newMamId) Sets the MamId attribute of the Agent object |
void | setNickname(String nickname) Sets the Nickname attribute of the Agent object |
void | setRole(String role) Sets the Role attribute of the Agent object |
protected void | setXmlSerializable(boolean xmlSerializable) Sets the XmlSerializable attribute of the Agent object |
String | toString() Description of the Method |
Element | toXmlElement() Description of the Method |
Element | toXmlElement(String tagName) Description of the Method |
protected void | unregisterRoutingTags() Description of the Method |
Methods inherited from class java.lang.Thread |
currentThread, yield, sleep, sleep, start, stop, stop, interrupt, interrupted, isInterrupted, destroy, isAlive, suspend, resume, setPriority, getPriority, setName, getName, getThreadGroup, activeCount, enumerate, countStackFrames, join, join, join, dumpStack, setDaemon, isDaemon, checkAccess, getContextClassLoader, setContextClassLoader |
Methods inherited from class java.lang.Object |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize |
Field Detail |
public final static String AGENT_ACCESS_STATISTICS_TAG_NAME
public final static String AGENT_PROPERTIES_TAG_NAME
public final static String AGENT_TRAITS_TAG_NAME
public final static RoutingTag ALL_AGENTS_ROUTING_TAG
public final static String DEFAULT_TAG_NAME
protected AccessStatisticsGroup m_accessStatisticsGroup
protected AgentProperties m_agentProperties
protected Facility m_facility
protected MessageQueue m_incomingMessageQueue
protected boolean m_shutdown
protected SleepManager m_sleepManager
private boolean m_xmlSerializable
public final static String ROLE_TAG_NAME
Constructor Detail |
public Agent()
public Agent(Facility facility, AgentProperties defaultAgentProperties)
Method Detail |
public synchronized void enqueueMessage(AgentMessage incomingMessage)
public void fromXmlElement(Element source)
public AccessStatisticsGroup getAccessStatisticsGroup()
public Account getAccount()
public AgentProperties getAgentProperties()
public AgentTraits getAgentTraits()
public String getDescription()
protected Facility getFacility()
public MamId getMamId()
public String getNickname()
public String getQuote()
public String getRole()
public RoutingTag getRoutingTagToSelf()
public boolean getXmlSerializable()
public void handleDoAgentShutdownMessage(AgentMessage m)
public void handleGetAccessStatisticsMessage(AgentMessage m)
public void handleGetAgentPropertiesMessage(AgentMessage m)
public void handleGetAgentTraitsMessage(AgentMessage m)
public void handleGetQuoteMessage(AgentMessage m)
protected void handleMessages()
public void handleSetDescriptionMessage(AgentMessage m)
public void handleSetNicknameMessage(AgentMessage m)
protected void idleActivity()
protected void invokeMessageHandler(AgentMessage message)
throws java.lang.Exception
protected void registerRoutingTags()
public boolean requiresPersistence()
public void run()
public void setAccount(Account account)
public void setAgentTraits(AgentTraits agentTraits)
public void setDescription(String description)
public void setFacility(Facility localFacility)
public void setMamId(MamId newMamId)
public void setNickname(String nickname)
public void setRole(String role)
protected void setXmlSerializable(boolean xmlSerializable)
public String toString()
public Element toXmlElement()
public Element toXmlElement(String tagName)
protected void unregisterRoutingTags()
| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |