![]() |
OpenMash Documentations | Class Index | Method Index | Class Hierarchy |
TCL CLASS
AnnounceListenManager/AS
Base class for AnnounceListenManager in Active Service Framework.
AnnounceListenManager/AS/Client, AnnounceListenManager/AS/Service, AnnounceListenManager/AS/HM, AnnounceListenManager/AS/Platform, AnnounceListenManager/AS/SSG, AnnounceListenManager/AS/ASMon, AnnounceListenManager/AS/MeGaMon
agentbytype_, avgdelta_, aliveid_, lastann_, atype_
An array of list of agents, indexed by type (srv, client, hm).
An array indexed by agent spec, that contains average time between announcement from the corresponding agent.
ID to the "after" callback check_alive{}.
An array indexed by agent spec, that contains time the last announcement was made to the corresponding agent. Time are stored as absolute time (gettimeofday) and as ascii time ( clock format).
Type of this agent
init, version, send_announcement, announce_death, agent_instance, agent_data, ssg_port, service_location, destroy, recv_announcement, check_alive, delete_agent, agenttab
AnnounceListenManager/AS instproc init { netspec bw atype }
Initialize various members and timer.
AnnounceListenManager/AS proc version { }
Return the version string of the current Active Service Framework.
AnnounceListenManager/AS public send_announcement { }
Construct an announcement, and send it. Since this method is called periodically, we take this chance to check for liveness in other agent by calling "check_alive 0" before exiting.
AnnounceListenManager/AS instproc announce_death { }
Construct a BYE announcement and announce it.
AnnounceListenManager/AS public agent_instance { }
Return a string that represent an instance of the current agent.
AnnounceListenManager/AS public agent_data { }
Subclass should overwrite this to return agent specific data.
AnnounceListenManager/AS public ssg_port { }
Subclass should overwrite this to return port number to a soft state gateway.
AnnounceListenManager/AS instproc service_location { }
Subclass should overwrite this to return the service location.
AnnounceListenManager/AS instproc destroy { }
Cleanup "after" callback.
AnnounceListenManager/AS instproc recv_announcement { addr port data size }
Called when an announcement is received. The announcement is parsed and special cases are handled (DEATH, BYE, wrong version). The method "recv_msg {}" is then called to process other general messages.
port
The port number where this announcement came from.
addr
The address where this announcement came from.
size
The length of data in bytes.
data
The data contained in this announcement.
AnnounceListenManager/AS instproc check_alive { timer }
Go through all agents and delete agents that hasn't been announcing for a while.
timer
Specify if this is a one time call (timer == 0), or we are gonna doing this periodically (timer == 1)
AnnounceListenManager/AS instproc delete_agent { aspec }
Assume that the agent specified by $aspec is dead. Clean up all states corresponding to that agent.
aspec
Specification to the agent to be deleted.
AnnounceListenManager/AS instproc agenttab { aspec }
Return the agent matching specification $aspec, or return "" if no such agent can be found.
aspec
Specification to the agent to be retrieve.
start, stop, announce, recv, timer, get_timer, set_announcement, get_announcement, ttl
Generated on Mon Apr 12 04:04:17 PDT 2004