|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jade.core.Agent | +--jade.tools.ToolAgent | +--jade.tools.sniffer.Sniffer
This is the Sniffer agent.
This class implements the low level part of the Sniffer, interacting with Jade
environment and with the sniffer GUI.
At startup, the sniffer subscribes itself as an rma to be informed every time
an agent is born or dead, a container is created or deleted.
For more information see Introduction to the Sniffer.
A properties file while may be used to control different sniffer properties. These optional properties are as follows:
preload=da0;da1 inform propose preload=agent?? inform preload=*
clip=com.hp.palo-alto.;helper.
The original implementation processed a .inf file. For backward compatability this has
been preserved but its usage should be converted to use the new .properties file. The format
of the .inf file is each line contains an agent name and optional list of performatives.
Example:
da0 da1 inform propose
Notes:
Nested Class Summary |
Nested classes inherited from class jade.tools.ToolAgent |
jade.tools.ToolAgent.AMSListenerBehaviour, jade.tools.ToolAgent.EventHandler |
Field Summary | |
static boolean |
SNIFF_OFF
|
static boolean |
SNIFF_ON
|
Fields inherited from class jade.core.Agent |
AP_ACTIVE, AP_COPY, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_TRANSIT, AP_WAITING, currentBehaviour, currentMessage, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN |
Constructor Summary | |
Sniffer()
|
Method Summary | |
jade.lang.acl.ACLMessage |
getSniffMsg(jade.util.leap.List agents,
boolean onFlag)
Creates the ACLMessage to be sent to the Ams with the list of the agent to be sniffed/unsniffed. |
protected boolean |
isMatch(java.lang.String aMatchExpression,
java.lang.String aString)
Given two strings determine if they match. |
protected java.lang.String |
preloadContains(java.lang.String agentName)
Search keys in preload for a string which matches (using isMatch method) the agent name. |
void |
sniffMsg(jade.util.leap.List agents,
boolean onFlag)
This method add an AMSBehaviour the perform a request to the AMS for sniffing/unsniffing list of agents. |
void |
toolSetup()
ACLMessages for subscription and unsubscription as rma are created and corresponding behaviours are set up. |
protected void |
toolTakeDown()
Cleanup during agent shutdown. |
Methods inherited from class jade.tools.ToolAgent |
getCancel, getRequest, getSubscribe, setup, takeDown |
Methods inherited from class jade.core.Agent |
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, doActivate, doClone, doDelete, doMove, doStart, doSuspend, doTimeOut, doWait, doWait, doWake, extractPassword, extractUsername, getAgentState, getAID, getAMS, getArguments, getAuthority, getCertificateFolder, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getPrincipal, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, read, read, receive, receive, removeBehaviour, restartLater, restore, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setOwnership, setPrincipal, setQueueSize, waitUntilStarted, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean SNIFF_ON
public static final boolean SNIFF_OFF
Constructor Detail |
public Sniffer()
Method Detail |
protected java.lang.String preloadContains(java.lang.String agentName)
agentName
- The agent name.
protected boolean isMatch(java.lang.String aMatchExpression, java.lang.String aString)
aMatchExpression
- An expression string with special significance to '?' and '*'.aString
- The subject string.
public void toolSetup()
toolSetup
in class jade.tools.ToolAgent
protected void toolTakeDown()
toolTakeDown
in class jade.tools.ToolAgent
public void sniffMsg(jade.util.leap.List agents, boolean onFlag)
public jade.lang.acl.ACLMessage getSniffMsg(jade.util.leap.List agents, boolean onFlag)
onFlag
- can be:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |