location
Interface LocationGenerator

All Known Implementing Classes:
FakeGPSMonitor, RealGPSMonitor

public interface LocationGenerator

This interface defines the methods and fields that a location generator must implement.

Version:
2.0
Author:
Chien-Liang Fok

Method Summary
 void addGpsInfoListener(GpsInfoListener gps)
          Add a GpsInfo listener.
 void addLocationListener(LocationListener ll)
          Add a Location listener.
 LocationEvent getLocation()
          Returns the most recently broadcasted location
 void kill()
          Stops the LocationGenerator.
 void removeGpsInfoListener(GpsInfoListener gps)
          Remove a GpsInfo listener.
 void removeLocationListener(LocationListener ll)
          Remove a location listener.
 

Method Detail

addLocationListener

public void addLocationListener(LocationListener ll)
Add a Location listener.
Parameters:
ll - the new location listener.
Returns:
true if the operation was successful.

removeLocationListener

public void removeLocationListener(LocationListener ll)
Remove a location listener.
Parameters:
ll - the location listener to remove.
Returns:
true if the operation was successful.

addGpsInfoListener

public void addGpsInfoListener(GpsInfoListener gps)
Add a GpsInfo listener.
Parameters:
gps - the new GpsInfo listener.
Returns:
true if the operation was successful.

removeGpsInfoListener

public void removeGpsInfoListener(GpsInfoListener gps)
Remove a GpsInfo listener.
Parameters:
gps - the GpsInfo listener to remove.
Returns:
true if the operation was successful.

getLocation

public LocationEvent getLocation()
Returns the most recently broadcasted location

kill

public void kill()
Stops the LocationGenerator. This should release all resources being consumed by the generator (e.g., COMM ports, TCP sockets, etc.)