kaos.vlik
Class PeriodicCheckAgentLifeService

java.lang.Object
  extended by kaos.vlik.PeriodicCheckAgentLifeService
All Implemented Interfaces:
AgentLifeService

public class PeriodicCheckAgentLifeService
extends java.lang.Object
implements AgentLifeService

An AgentLifeService which periodically queries the directory service.


Field Summary
static int DEFUALT_PERIOD
           
 
Constructor Summary
PeriodicCheckAgentLifeService()
           
PeriodicCheckAgentLifeService(int period)
           
 
Method Summary
 java.util.List addListener(AgentLifeListener ls)
           
 void removeListener(AgentLifeListener ls)
           
 void terminate()
          Remove all of its listeners and free any other resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFUALT_PERIOD

public static int DEFUALT_PERIOD
Constructor Detail

PeriodicCheckAgentLifeService

public PeriodicCheckAgentLifeService()

PeriodicCheckAgentLifeService

public PeriodicCheckAgentLifeService(int period)
Parameters:
period - Time between queries in milliseconds.
Method Detail

addListener

public java.util.List addListener(AgentLifeListener ls)
Specified by:
addListener in interface AgentLifeService
Returns:
Register ls for updates, and return the current list of live agents.

removeListener

public void removeListener(AgentLifeListener ls)
Specified by:
removeListener in interface AgentLifeService

terminate

public void terminate()
Description copied from interface: AgentLifeService
Remove all of its listeners and free any other resources.

Specified by:
terminate in interface AgentLifeService