org.compass.gps.impl
Class AbstractCompassGps

java.lang.Object
  extended by org.compass.gps.impl.AbstractCompassGps
All Implemented Interfaces:
CompassGps, CompassGpsInterfaceDevice
Direct Known Subclasses:
DualCompassGps, SingleCompassGps

public abstract class AbstractCompassGps
extends Object
implements CompassGpsInterfaceDevice

A simple base class for CompassGps implementations.

Author:
kimchy

Field Summary
protected  HashMap devices
           
 
Constructor Summary
AbstractCompassGps()
           
 
Method Summary
 void addGpsDevice(CompassGpsDevice gpsDevice)
          Adds a CompassGpsDevice to be managed.
protected abstract  void doIndex()
           
protected abstract  void doStart()
           
protected abstract  void doStop()
           
protected  boolean hasMappingForEntity(Class clazz, Compass checkedCompass)
           
protected  boolean hasMappingForEntity(String name, Compass checkedCompass)
           
 void index()
          Indexes all the different devices (by calling their respective index() operation.
 boolean isPerformingIndexOperation()
          Retuns true if the devide performs the index operaiton.
 boolean isRunning()
          Return true is started.
 void setGpsDevices(CompassGpsDevice[] devices)
          Sets a list of CompassGpsDevices that will be managed.
 void start()
          Start CompassGps (also starts all the devices).
 void stop()
          Stops CompassGps (also starts all the devices).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.gps.CompassGpsInterfaceDevice
executeForIndex, executeForMirror, getIndexCompass, getMirrorCompass, hasMappingForEntityForIndex, hasMappingForEntityForIndex, hasMappingForEntityForMirror, hasMappingForEntityForMirror
 

Field Detail

devices

protected HashMap devices
Constructor Detail

AbstractCompassGps

public AbstractCompassGps()
Method Detail

addGpsDevice

public void addGpsDevice(CompassGpsDevice gpsDevice)
Description copied from interface: CompassGps
Adds a CompassGpsDevice to be managed.

Specified by:
addGpsDevice in interface CompassGps

setGpsDevices

public void setGpsDevices(CompassGpsDevice[] devices)
Description copied from interface: CompassGps
Sets a list of CompassGpsDevices that will be managed.

Specified by:
setGpsDevices in interface CompassGps

hasMappingForEntity

protected boolean hasMappingForEntity(Class clazz,
                                      Compass checkedCompass)

hasMappingForEntity

protected boolean hasMappingForEntity(String name,
                                      Compass checkedCompass)

index

public void index()
           throws CompassGpsException,
                  IllegalStateException
Description copied from interface: CompassGps
Indexes all the different devices (by calling their respective index() operation.

Specified by:
index in interface CompassGps
Throws:
CompassGpsException
IllegalStateException

doIndex

protected abstract void doIndex()
                         throws CompassGpsException
Throws:
CompassGpsException

start

public void start()
           throws CompassGpsException
Description copied from interface: CompassGps
Start CompassGps (also starts all the devices).

Specified by:
start in interface CompassGps
Throws:
CompassGpsException

doStart

protected abstract void doStart()
                         throws CompassGpsException
Throws:
CompassGpsException

doStop

protected abstract void doStop()
                        throws CompassGpsException
Throws:
CompassGpsException

stop

public void stop()
          throws CompassGpsException
Description copied from interface: CompassGps
Stops CompassGps (also starts all the devices).

Specified by:
stop in interface CompassGps
Throws:
CompassGpsException

isRunning

public boolean isRunning()
Description copied from interface: CompassGps
Return true is started.

Specified by:
isRunning in interface CompassGps

isPerformingIndexOperation

public boolean isPerformingIndexOperation()
Description copied from interface: CompassGps
Retuns true if the devide performs the index operaiton.

Specified by:
isPerformingIndexOperation in interface CompassGps


Copyright (c) 2004-2006 The Compass Project.