org.compass.gps
Interface CompassGps

All Known Subinterfaces:
CompassGpsInterfaceDevice, JpaCompassGps
All Known Implementing Classes:
AbstractCompassGps, DefaultJpaCompassGps, DualCompassGps, SingleCompassGps

public interface CompassGps

CompassGps is responsible for managing CompassGpsDevices. It can hold one or more devices, and manage their lifecycle. It is also resposible for creating an abstraction between devices and their repectice Compass instances, as part of the internal contract between CompassGps and its devices and should not be used by a non-device code (see CompassGpsInterfaceDevice).

Author:
kimchy

Method Summary
 void addGpsDevice(CompassGpsDevice gpsDevice)
          Adds a CompassGpsDevice to be managed.
 void index()
          Indexes all the different devices (by calling their respective index() operation.
 void index(Class... types)
          Index just the given types.
 void index(IndexPlan indexPlan)
          Indexes all the different devices based on the given index plan.
 void index(String... aliases)
          Index just the aliases.
 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).
 

Method Detail

addGpsDevice

void addGpsDevice(CompassGpsDevice gpsDevice)
Adds a CompassGpsDevice to be managed.

Parameters:
gpsDevice -

setGpsDevices

void setGpsDevices(CompassGpsDevice[] devices)
Sets a list of CompassGpsDevices that will be managed.

Parameters:
devices -

start

void start()
           throws CompassGpsException
Start CompassGps (also starts all the devices).

Throws:
CompassGpsException

stop

void stop()
          throws CompassGpsException
Stops CompassGps (also starts all the devices).

Throws:
CompassGpsException

isRunning

boolean isRunning()
Return true is started.


isPerformingIndexOperation

boolean isPerformingIndexOperation()
Retuns true if the devide performs the index operaiton.


index

void index()
           throws CompassGpsException,
                  IllegalStateException
Indexes all the different devices (by calling their respective index() operation.

Similar to calling the index(IndexPlan) with a new instance of DefaultIndexPlan (and nothing else set).

Throws:
CompassGpsException
IllegalStateException

index

void index(Class... types)
           throws CompassGpsException,
                  IllegalStateException
Index just the given types.

Throws:
CompassGpsException
IllegalStateException

index

void index(String... aliases)
           throws CompassGpsException,
                  IllegalStateException
Index just the aliases.

Throws:
CompassGpsException
IllegalStateException

index

void index(IndexPlan indexPlan)
           throws CompassGpsException,
                  IllegalStateException
Indexes all the different devices based on the given index plan. The index plan, by default, supports constraining the indexing process to specific classes/aliases/sub indexes.

Throws:
CompassGpsException
IllegalStateException


Copyright (c) 2004-2009 The Compass Project.