cat.sensor.core
Class DiscoveryProxy

java.lang.Object
  extended bycat.sensor.core.DiscoveryProxy

public class DiscoveryProxy
extends java.lang.Object

This is a special SensorProxy which has a sole purpose of Discovering the other agents near us. It sends multicast messages to all other agents around us. In addition, it listens for discovery messages from other agents. It keeps a list of all current agents around us.


Nested Class Summary
 class DiscoveryProxy.Discover
          This class is used to send DiscoveryMessages to all agents aroudn us.
 class DiscoveryProxy.Update
          This class is used to keep our list of agents around us current.
 
Field Summary
private  java.util.Vector agents
          List of known/encounter/discovered agents.
private  LeafSensor leafSensor
          The LeafSensor that will receive discovery events from this proxy.
private  java.util.HashMap table
          Table contain agents and time discovered.
 
Constructor Summary
DiscoveryProxy(LeafSensor rawsensor)
          Constructor starts up the threads for publishing and listening to Discover events.
 
Method Summary
 void incomingMessage(Message msg)
          This is how the Sensor Proxy will Messages from iSIM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leafSensor

private LeafSensor leafSensor
The LeafSensor that will receive discovery events from this proxy.


table

private java.util.HashMap table
Table contain agents and time discovered.


agents

private java.util.Vector agents
List of known/encounter/discovered agents.

Constructor Detail

DiscoveryProxy

public DiscoveryProxy(LeafSensor rawsensor)
Constructor starts up the threads for publishing and listening to Discover events.

Method Detail

incomingMessage

public void incomingMessage(Message msg)
This is how the Sensor Proxy will Messages from iSIM. You can then check for what type of message, and then get the data you want from the message. Then pass the datato the RawSensor.

Parameters:
msg - The incoming msg that this proxy received from other agents using CAT.