mam.agent
Class SecretAgent

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--mam.agent.Agent
              |
              +--mam.agent.TransactionalAgent
                    |
                    +--mam.agent.SecretAgent

public class SecretAgent
extends TransactionalAgent

Description of the Class

Author:
nideffer
created October 8, 2001

Field Summary
 protected final static StringADD_KNOWLEDGE_AGENT_MESSAGE_WAITER_ID
           
 protected final static longDEFAULT_TIMEOUT
           
 protected final static longDEFAULT_UPDATE_PERIOD
           
 protected final static StringGET_MONITOR_AGENT_MESSAGE_WAITER_ID
           
 protected final static StringKNOWN_INFORMATION_PERSONAE_ROLE
           
 protected Collectionm_associatedMonitorAgents
           
 protected RoutingTagm_attrBossRoutingTag
           
 protected booleanm_attrMissionOn
           
 protected Collectionm_secretIdentities
           
 protected final static StringQUERY_TARGET_AGENT_MESSAGE_WAITER_ID
           
 protected final static StringREMOVE_KNOWLEDGE_AGENT_MESSAGE_WAITER_ID
           

Fields inherited from class mam.agent.TransactionalAgent
m_messageWaiters

Fields inherited from class mam.agent.Agent
AGENT_ACCESS_STATISTICS_TAG_NAME, AGENT_PROPERTIES_TAG_NAME, AGENT_TRAITS_TAG_NAME, ALL_AGENTS_ROUTING_TAG, DEFAULT_TAG_NAME, m_accessStatisticsGroup, m_agentProperties, m_facility, m_incomingMessageQueue, m_shutdown, m_sleepManager, ROLE_TAG_NAME

Fields inherited from class java.lang.Thread
MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY

Constructor Summary
SecretAgent()
          Constructor for the SecretAgent object

Method Summary
 protected voidfinishAddKnowledgeAgentReport(MessageWaiter messageWaiter)
          Description of the Method
 voidfinished(MessageWaiter messageWaiter)
          Description of the Method
 protected voidfinishRemoveKnowledgeAgentReport(MessageWaiter messageWaiter)
          Description of the Method
 protected RoutingTaggetBossRoutingTag()
          Gets the BossRoutingTag attribute of the SecretAgent object
 protected booleangetMissionOn()
          Gets the MissionOn attribute of the SecretAgent object
 protected CollectiongetSecretIdentities()
          Gets the SecretIdentities attribute of the SecretAgent object
 voidhandleDoAddIdentityMessage(AgentMessage m)
          Description of the Method
 voidhandleDoEndMissionMessage(AgentMessage m)
          Description of the Method
 voidhandleDoRemoveIdentityMessage(AgentMessage m)
          Description of the Method
 voidhandleDoStartMissionMessage(AgentMessage m)
          Description of the Method
 voidhandleEventMonitoredUrlAddedMessage(AgentMessage m)
          Description of the Method
 voidhandleEventMonitoredUrlRemovedMessage(AgentMessage m)
          Description of the Method
 voidhandleGetQuoteMessage(AgentMessage m)
          Description of the Method
 protected voidinvokeMessageHandler(AgentMessage message)
          Utility method to use reflection to invoke the standard handler for whatever message is passed.
 protected voidremoveAssociatedMonitorAgents()
          Description of the Method
 protected voidremoveSecretIdentities()
          Description of the Method
 protected voidreport(AgentMessage m)
          Description of the Method
 voidresponsesReceived(MessageWaiter messageWaiter, Serializable identifier, Collection recentResponses)
          Description of the Method
 protected voidsetBossRoutingTag(RoutingTag bossRoutingTag)
          Sets the BossRoutingTag attribute of the SecretAgent object
 protected voidsetMissionOn(boolean missionOn)
          Sets the MissionOn attribute of the SecretAgent object
 protected voidupdateDisguise(MessageWaiter messageWaiter)
          Description of the Method
 protected voidupdateMonitorAgentMapping(MessageWaiter messageWaiter)
          Description of the Method

Methods inherited from class mam.agent.TransactionalAgent
enqueueMessage, getMessageWaiters

Methods inherited from class mam.agent.Agent
fromXmlElement, getAccessStatisticsGroup, getAccount, getAgentProperties, getAgentTraits, getDescription, getFacility, getMamId, getNickname, getQuote, getRole, getRoutingTagToSelf, getXmlSerializable, handleDoAgentShutdownMessage, handleGetAccessStatisticsMessage, handleGetAgentPropertiesMessage, handleGetAgentTraitsMessage, handleMessages, handleSetDescriptionMessage, handleSetNicknameMessage, idleActivity, registerRoutingTags, requiresPersistence, run, setAccount, setAgentTraits, setDescription, setFacility, setMamId, setNickname, setRole, setXmlSerializable, toString, toXmlElement, toXmlElement, unregisterRoutingTags

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

ADD_KNOWLEDGE_AGENT_MESSAGE_WAITER_ID

protected final static String ADD_KNOWLEDGE_AGENT_MESSAGE_WAITER_ID

DEFAULT_TIMEOUT

protected final static long DEFAULT_TIMEOUT

DEFAULT_UPDATE_PERIOD

protected final static long DEFAULT_UPDATE_PERIOD

GET_MONITOR_AGENT_MESSAGE_WAITER_ID

protected final static String GET_MONITOR_AGENT_MESSAGE_WAITER_ID

KNOWN_INFORMATION_PERSONAE_ROLE

protected final static String KNOWN_INFORMATION_PERSONAE_ROLE

m_associatedMonitorAgents

protected Collection m_associatedMonitorAgents

m_attrBossRoutingTag

protected RoutingTag m_attrBossRoutingTag

m_attrMissionOn

protected boolean m_attrMissionOn

m_secretIdentities

protected Collection m_secretIdentities

QUERY_TARGET_AGENT_MESSAGE_WAITER_ID

protected final static String QUERY_TARGET_AGENT_MESSAGE_WAITER_ID

REMOVE_KNOWLEDGE_AGENT_MESSAGE_WAITER_ID

protected final static String REMOVE_KNOWLEDGE_AGENT_MESSAGE_WAITER_ID
Constructor Detail

SecretAgent

public SecretAgent()
Constructor for the SecretAgent object
Since:
Method Detail

finishAddKnowledgeAgentReport

protected void finishAddKnowledgeAgentReport(MessageWaiter messageWaiter)
Description of the Method
Parameters:
messageWaiter - Description of Parameter
Since:

finished

public void finished(MessageWaiter messageWaiter)
Description of the Method
Parameters:
messageWaiter - Description of Parameter
Since:

finishRemoveKnowledgeAgentReport

protected void finishRemoveKnowledgeAgentReport(MessageWaiter messageWaiter)
Description of the Method
Parameters:
messageWaiter - Description of Parameter
Since:

getBossRoutingTag

protected RoutingTag getBossRoutingTag()
Gets the BossRoutingTag attribute of the SecretAgent object
Returns: The BossRoutingTag value
Since:

getMissionOn

protected boolean getMissionOn()
Gets the MissionOn attribute of the SecretAgent object
Returns: The MissionOn value
Since:

getSecretIdentities

protected Collection getSecretIdentities()
Gets the SecretIdentities attribute of the SecretAgent object
Returns: The SecretIdentities value
Since:

handleDoAddIdentityMessage

public void handleDoAddIdentityMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

handleDoEndMissionMessage

public void handleDoEndMissionMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

handleDoRemoveIdentityMessage

public void handleDoRemoveIdentityMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

handleDoStartMissionMessage

public void handleDoStartMissionMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

handleEventMonitoredUrlAddedMessage

public void handleEventMonitoredUrlAddedMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

handleEventMonitoredUrlRemovedMessage

public void handleEventMonitoredUrlRemovedMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

handleGetQuoteMessage

public void handleGetQuoteMessage(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

invokeMessageHandler

protected void invokeMessageHandler(AgentMessage message)
throws java.lang.Exception
Utility method to use reflection to invoke the standard handler for whatever message is passed.
Parameters:
message - Description of Parameter
Throws:
Exception - Description of Exception
Since:

removeAssociatedMonitorAgents

protected void removeAssociatedMonitorAgents()
Description of the Method
Since:

removeSecretIdentities

protected void removeSecretIdentities()
Description of the Method
Since:

report

protected void report(AgentMessage m)
Description of the Method
Parameters:
m - Description of Parameter
Since:

responsesReceived

public void responsesReceived(MessageWaiter messageWaiter, Serializable identifier, Collection recentResponses)
Description of the Method
Parameters:
messageWaiter - Description of Parameter
identifier - Description of Parameter
recentResponses - Description of Parameter
Since:

setBossRoutingTag

protected void setBossRoutingTag(RoutingTag bossRoutingTag)
Sets the BossRoutingTag attribute of the SecretAgent object
Parameters:
bossRoutingTag - The new BossRoutingTag value
Since:

setMissionOn

protected void setMissionOn(boolean missionOn)
Sets the MissionOn attribute of the SecretAgent object
Parameters:
missionOn - The new MissionOn value
Since:

updateDisguise

protected void updateDisguise(MessageWaiter messageWaiter)
Description of the Method
Parameters:
messageWaiter - Description of Parameter
Since:

updateMonitorAgentMapping

protected void updateMonitorAgentMapping(MessageWaiter messageWaiter)
Description of the Method
Parameters:
messageWaiter - Description of Parameter
Since: