org.placelab.spotter
Class ListenerBluetoothGPSSpotter

java.lang.Object
  extended byorg.placelab.spotter.AbstractSpotter
      extended byorg.placelab.spotter.NMEAGPSSpotter
          extended byorg.placelab.spotter.BluetoothGPSSpotter
              extended byorg.placelab.spotter.ListenerBluetoothGPSSpotter
All Implemented Interfaces:
Spotter, SpotterListener

public class ListenerBluetoothGPSSpotter
extends BluetoothGPSSpotter
implements SpotterListener


Nested Class Summary
 
Nested classes inherited from class org.placelab.spotter.BluetoothGPSSpotter
BluetoothGPSSpotter.ScanThread
 
Field Summary
 
Fields inherited from class org.placelab.spotter.BluetoothGPSSpotter
conn, connectedDeviceName, is, lingeringData, scanThread, serviceUrl, shutdown, state
 
Constructor Summary
ListenerBluetoothGPSSpotter(BluetoothSpotter bt)
           
 
Method Summary
 void close()
          Unloads resources used by the spotter.
protected  void findGPS()
          Locates a bluetooth gps device and hooks up serviceUrl, conn, and is.
 void gotMeasurement(Spotter sp, Measurement m)
           
 void open()
          Load resources used by the spotter.
 void spotterExceptionThrown(Spotter sp, SpotterException se)
           
 
Methods inherited from class org.placelab.spotter.BluetoothGPSSpotter
cleanup, getState, readGPSData, scanningThreadRun, sendASentence, startScanningImpl, stopScanningImpl
 
Methods inherited from class org.placelab.spotter.NMEAGPSSpotter
getMeasurement, lineAvailable, measurementAvailable, startScanning, startScanning, stopScanning
 
Methods inherited from class org.placelab.spotter.AbstractSpotter
addListener, notifyEndOfScan, notifyEndOfScan, notifyGotException, notifyGotException, notifyGotMeasurement, notifyGotMeasurement, removeListener, scanOnce, scanOnce, waitForThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerBluetoothGPSSpotter

public ListenerBluetoothGPSSpotter(BluetoothSpotter bt)
Method Detail

open

public void open()
Description copied from interface: Spotter
Load resources used by the spotter. Applications should be able to invoke this methods multiple times in sequence and have the "right" things happen. All Spotters should be opened before being used.

Specified by:
open in interface Spotter
Overrides:
open in class BluetoothGPSSpotter

close

public void close()
Description copied from interface: Spotter
Unloads resources used by the spotter. Multiple calls to close are ok.

Specified by:
close in interface Spotter
Overrides:
close in class BluetoothGPSSpotter

gotMeasurement

public void gotMeasurement(Spotter sp,
                           Measurement m)
Specified by:
gotMeasurement in interface SpotterListener

spotterExceptionThrown

public void spotterExceptionThrown(Spotter sp,
                                   SpotterException se)
Specified by:
spotterExceptionThrown in interface SpotterListener

findGPS

protected void findGPS()
Description copied from class: BluetoothGPSSpotter
Locates a bluetooth gps device and hooks up serviceUrl, conn, and is. If no bluetooth gps device can be found, leave those 3 alone. Feel free to block in here if you like.

Specified by:
findGPS in class BluetoothGPSSpotter