madkit.kernel
Class Watcher
java.lang.Object
madkit.kernel.AbstractAgent
madkit.kernel.Watcher
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- BeeEnvironment, BeeWorldViewer, DebugViewer, MapViewer, Observer
public abstract class Watcher
- extends AbstractAgent
This class defines a generic watcher agent. It holds a collection of probes to explore agents' internal properties.
- Since:
- MadKit 2.0
- Version:
- 3.0
- Author:
- Fabien Michel (MadKit 3.0 05/09/01) and 2.0 (Overlooker)., Olivier Gutknecht version 1.0
- See Also:
- Serialized Form
Methods inherited from class madkit.kernel.AbstractAgent |
activate, broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, destroyGroup, disposeMyGUI, foundGroup, getAddress, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, hideMyGUI, initGUI, isBelongingToGroup, isBelongingToGroup, isCommunity, isGroup, isGroup, isMemberOf, isMemberOf, isMessageBoxEmpty, isRole, isRole, joinGroup, killAgent, launchAgent, launchAgent, leaveGroup, leaveGroup, leaveRole, leaveRole, nextMessage, print, println, receiveMessage, redisplayMyGUI, requestRole, requestRole, requestRole, restoreAgent, sendMessage, sendMessage, sendMessage, setBean, setController, setDebug, setGUIObject, setName, setOutput, setOutputWriter, toString, windowClosing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Watcher
public Watcher()
addProbe
public final void addProbe(Probe<? extends AbstractAgent> p)
addProbe
public final void addProbe(Probe<? extends AbstractAgent> p,
java.lang.Object accessCard)
removeProbe
public final void removeProbe(Probe<? extends AbstractAgent> p)
getProbes
public final Probe<? extends AbstractAgent>[] getProbes()
removeAllProbes
public final void removeAllProbes()
end
public void end()
- the end method will remove all the probes which have been used by the scheduler.
Overriding this method, one should use
super.end()
first in order to ease the removal of simulated agents which will be killed.
Doing so can greatly improved the "killing time" of simulation engines
- Overrides:
end
in class AbstractAgent
- See Also:
AbstractAgent.end()
update
public void update()
- Deprecated. since MadKit 2.1 : update is now useless as the Probe's agents variable is updated automatically
Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.