jade.domain.JADEAgentManagement
Class SniffOff

java.lang.Object
  extended by jade.domain.JADEAgentManagement.SniffOff
All Implemented Interfaces:
AgentAction, Concept, ContentElement, Term, java.io.Serializable

public class SniffOff
extends java.lang.Object
implements AgentAction

This class represents the sniff-off action, requesting a sniffer to stop observing a set of agents in the platform.

Version:
$Date: 2003-11-24 14:47:00 +0100 (lun, 24 nov 2003) $ $Revision: 4597 $
Author:
Giovanni Rimassa - Universita' di Parma
See Also:
Serialized Form

Constructor Summary
SniffOff()
          Default constructor.
 
Method Summary
 void addSniffedAgents(AID id)
          Add an agent identifier to the sniffed-agents slot collection of this object.
 void clearAllSniffedAgents()
          Remove all agent identifiers from the sniffed-agents slot collection of this object.
 Iterator getAllSniffedAgents()
          Access all agent identifiers from the sniffed-agents slot collection of this object.
 ArrayList getCloneOfSniffedAgents()
          This method is called by the AMS in order to prepare an RMI call.
 java.lang.String getPassword()
          Retrieve the value of the password slot of this action, containing the password used to authenticate the principal requesting this action.
 AID getSniffer()
          Retrieve the value of the sniffer slot of this action, containing the agent identifier of the sniffer agent.
 boolean removeSniffedAgents(AID id)
          Remove an agent identifier from the sniffed-agents slot collection of this object.
 void setPassword(java.lang.String p)
          Set the password slot of this action.
 void setSniffer(AID id)
          Set the sniffer slot of this action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SniffOff

public SniffOff()
Default constructor. A default constructor is necessary for ontological classes.

Method Detail

setSniffer

public void setSniffer(AID id)
Set the sniffer slot of this action.

Parameters:
id - The agent identifier of the sniffer agent.

getSniffer

public AID getSniffer()
Retrieve the value of the sniffer slot of this action, containing the agent identifier of the sniffer agent.

Returns:
The value of the sniffer slot, or null if no value was set.

clearAllSniffedAgents

public void clearAllSniffedAgents()
Remove all agent identifiers from the sniffed-agents slot collection of this object.


addSniffedAgents

public void addSniffedAgents(AID id)
Add an agent identifier to the sniffed-agents slot 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 the sniffed-agents slot 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 the sniffed-agents slot 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. The getAllSniffedAgents() cannot be used as it returns an Iterator that is not serializable.


setPassword

public void setPassword(java.lang.String p)
Set the password slot of this action.

Parameters:
p - The password used to authenticate the principal requesting this action.

getPassword

public java.lang.String getPassword()
Retrieve the value of the password slot of this action, containing the password used to authenticate the principal requesting this action.

Returns:
The value of the password slot, or null if no value was set.