Interface LocationTracker

All Known Implementing Classes:
TestApp

public interface LocationTracker

This interface provides the means for an implementing class to be notified of room changes that occur in the MobileClient class. When a room change occurs within the MobileClient class, the LocationTracker interface's roomChanged() method is called in order to notify application classes that implement the LocationTracker interface.

Any Java class that creates a MobileClient object needs to implement the LocationTracker interface so that the MobileClient class can notify the Java class of any room changes that occur.


Method Summary
 void roomChanged(java.util.HashMap distribution)
          This method is called by the MobileClient class when a change in room location occurs.
 

Method Detail

roomChanged

public void roomChanged(java.util.HashMap distribution)
This method is called by the MobileClient class when a change in room location occurs. A HashMap describing the room distribution is passed into this method so that any class implementing the LocationTracker interface can interpret the room change appropriately. The HashMap stores the relative magnitude of room messages for wihch ultrasound has been detected. Higher magnitudes represent a greater likelihood of being in that room. Thus, the HashMap represents a probability distribution for room location.

Parameters:
distribution - Collection that maps room strings to a relative magnitude.