Package jade.domain.JADEAgentManagement
Class SniffOn
- java.lang.Object
-
- jade.domain.JADEAgentManagement.SniffOn
-
- All Implemented Interfaces:
AgentAction,Concept,ContentElement,Term,Serializable,Serializable
public class SniffOn extends Object implements AgentAction
This class represents thesniff-offaction, requesting a sniffer to start observing a set of agents in the platform.- Version:
- $Date$ $Revision$
- Author:
- Giovanni Rimassa - Universita' di Parma
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SniffOn()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSniffedAgents(AID id)Add an agent identifier to thesniffed-agentsslot collection of this object.voidclearAllSniffedAgents()Remove all agent identifiers from thesniffed-agentsslot collection of this object.IteratorgetAllSniffedAgents()Access all agent identifiers from thesniffed-agentsslot collection of this object.ArrayListgetCloneOfSniffedAgents()This method is called by the AMS in order to prepare an RMI call.StringgetPassword()Retrieve the value of thepasswordslot of this action, containing the password used to authenticate the principal requesting this action.AIDgetSniffer()Retrieve the value of thesnifferslot of this action, containing the agent identifier of the sniffer agent.booleanremoveSniffedAgents(AID id)Remove an agent identifier from thesniffed-agentsslot collection of this object.voidsetPassword(String p)Set thepasswordslot of this action.voidsetSniffer(AID id)Set thesnifferslot of this action.
-
-
-
Method Detail
-
setSniffer
public void setSniffer(AID id)
Set thesnifferslot of this action.- Parameters:
id- The agent identifier of the sniffer agent.
-
getSniffer
public AID getSniffer()
Retrieve the value of thesnifferslot of this action, containing the agent identifier of the sniffer agent.- Returns:
- The value of the
snifferslot, ornullif no value was set.
-
clearAllSniffedAgents
public void clearAllSniffedAgents()
Remove all agent identifiers from thesniffed-agentsslot collection of this object.
-
addSniffedAgents
public void addSniffedAgents(AID id)
Add an agent identifier to thesniffed-agentsslot collection of this object.- Parameters:
id- The agent identifier to add to the collection.
-
removeSniffedAgents
public boolean removeSniffedAgents(AID id)
Remove an agent identifier from thesniffed-agentsslot collection of this object.- Parameters:
id- The agent identifier to remove from the collection.- Returns:
- A boolean, telling whether the element was present in the collection or not.
-
getAllSniffedAgents
public Iterator getAllSniffedAgents()
Access all agent identifiers from thesniffed-agentsslot collection of this object.- Returns:
- An iterator over the properties collection.
-
getCloneOfSniffedAgents
public ArrayList getCloneOfSniffedAgents()
This method is called by the AMS in order to prepare an RMI call. ThegetAllSniffedAgents()cannot be used as it returns anIteratorthat is not serializable.
-
setPassword
public void setPassword(String p)
Set thepasswordslot of this action.- Parameters:
p- The password used to authenticate the principal requesting this action.
-
getPassword
public String getPassword()
Retrieve the value of thepasswordslot of this action, containing the password used to authenticate the principal requesting this action.- Returns:
- The value of the
passwordslot, ornullif no value was set.
-
-