uwcse.location.client
Class PersonTracker
java.lang.Object
|
+--com.intel.research.rain.Service
|
+--uwcse.location.LocationService
|
+--uwcse.location.FusionClientService
|
+--uwcse.location.client.PersonTracker
- All Implemented Interfaces:
- MessageHandler
- public class PersonTracker
- extends FusionClientService
An example application to track and textually display the location of all
Humans known to the system.
- Version:
- $Revision: 1.4 $
- Author:
- Jeffrey Hightower
| Methods inherited from class uwcse.location.LocationService |
addObject, callLocationRpc, correctedTimeMillis, getObject, getSysclockError, handleTerminalCommand, multicastLocationMsg, multicastLocationMsgs, processLocationMsg, processLocationRpc, runTerminalCommandLoop, sendLocationMsg, sendLocationMsgs, setDescription |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersonTracker
public PersonTracker(Set names)
throws RainException,
LocationException
- Create a person tracker.
- Throws:
RainException
LocationException
processLocationMsg
protected void processLocationMsg(ServiceID from,
LocationMsg@SubscriberLocationReportMsg report)
- Display the location reports.
- Overrides:
processLocationMsg in class LocationService
processLocationMsg
protected void processLocationMsg(ServiceID from,
LocationMsg@SubscriberExpirationMsg expMsg)
- Resubscribe when we get the expiration message. A real service would
want to handle subscription and resubscription failures in a more robust
manner using the renewal mechanisms in case this expiration notification
message were dropped in the network.
- Overrides:
processLocationMsg in class LocationService
withdraw
protected void withdraw()
- Supplement the inherited behavior to cancel the subscription when
withdrawing from Rain.
- Overrides:
withdraw in class FusionClientService
printUsageAndExit
protected static void printUsageAndExit()
- Show the program argument usage and then exit.
main
public static void main(String[] argv)
This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/
© Copyright 2004 University of Washington CSE