public class Sniffer
extends jade.tools.ToolAgent
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:
Modifier and Type | Field and Description |
---|---|
static boolean |
SNIFF_OFF |
static boolean |
SNIFF_ON |
Constructor and Description |
---|
Sniffer() |
Modifier and Type | Method and Description |
---|---|
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
agents 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) |
void |
sniffMsg(jade.util.leap.List agents,
boolean onFlag)
This method adds an AMSClientBehaviour that performs 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.
|
afterClone, afterLoad, afterMove, afterReload, afterThaw, beforeFreeze, beforeMove, beforeReload, beforeSave, getCancel, getRequest, getSubscribe, setup, takeDown
addBehaviour, beforeClone, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getProperty, getQueueSize, getState, here, isRestarting, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, registerO2AInterface, removeBehaviour, removeTimer, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setO2AManager, setQueueSize, waitUntilStarted, write
public static final boolean SNIFF_ON
public static final boolean SNIFF_OFF
protected java.lang.String preloadContains(java.lang.String agentName)
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)
agentVect
- vector containing TreeData item representing the agentsonFlag
- can be: