org.compass.gps.device.jdo
Class Jdo2GpsDevice

java.lang.Object
  extended by org.compass.gps.device.AbstractGpsDevice
      extended by org.compass.gps.device.jdo.JdoGpsDevice
          extended by org.compass.gps.device.jdo.Jdo2GpsDevice
All Implemented Interfaces:
CompassGpsDevice, MirrorDataChangesGpsDevice, PassiveMirrorGpsDevice

public class Jdo2GpsDevice
extends JdoGpsDevice
implements PassiveMirrorGpsDevice

Adds real time monitoring on top of JDO 1 support (see JdoGpsDevice), using JDO 2 lifecycle events.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.gps.device.jdo.JdoGpsDevice
persistenceManagerFactory
 
Fields inherited from class org.compass.gps.device.AbstractGpsDevice
compassGps, log
 
Constructor Summary
Jdo2GpsDevice()
           
Jdo2GpsDevice(String name, javax.jdo.PersistenceManagerFactory persistenceManagerFactory)
           
 
Method Summary
protected  void doStart()
          Derived devices can implement it in case of start event notification.
protected  void doStop()
          Derived devices can implement it in case of stop event notification.
 boolean isIgnoreMirrorExceptions()
          Should exceptions be ignored during the mirroring operations (the JDO 2 event listeners).
 boolean isMirrorDataChanges()
          Should the device perform real time data mirroring.
 void setIgnoreMirrorExceptions(boolean ignoreMirrorExceptions)
          Should exceptions be ignored during the mirroring operations (the JDO 2 event listeners).
 void setMirrorDataChanges(boolean mirrorDataChanges)
          Sets if the device will perform real time data changes mirroring.
 
Methods inherited from class org.compass.gps.device.jdo.JdoGpsDevice
doIndex, getPersistenceManagerFactory, setPersistenceManagerFactory
 
Methods inherited from class org.compass.gps.device.AbstractGpsDevice
buildMessage, getGps, getName, index, injectGps, isFilteredForIndex, isPerformingIndexOperation, isRunning, setFilteredEntitiesForIndex, setName, shouldMirrorDataChanges, start, stop
 
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.CompassGpsDevice
getGps, getName, index, injectGps, isPerformingIndexOperation, isRunning, setName, shouldMirrorDataChanges, start, stop
 

Constructor Detail

Jdo2GpsDevice

public Jdo2GpsDevice()

Jdo2GpsDevice

public Jdo2GpsDevice(String name,
                     javax.jdo.PersistenceManagerFactory persistenceManagerFactory)
Method Detail

isMirrorDataChanges

public boolean isMirrorDataChanges()
Description copied from interface: MirrorDataChangesGpsDevice
Should the device perform real time data mirroring.

Specified by:
isMirrorDataChanges in interface MirrorDataChangesGpsDevice
Returns:
true if the device mirror data changes

setMirrorDataChanges

public void setMirrorDataChanges(boolean mirrorDataChanges)
Description copied from interface: MirrorDataChangesGpsDevice
Sets if the device will perform real time data changes mirroring.

Specified by:
setMirrorDataChanges in interface MirrorDataChangesGpsDevice
Parameters:
mirrorDataChanges - Should the device mirror data changes

isIgnoreMirrorExceptions

public boolean isIgnoreMirrorExceptions()
Should exceptions be ignored during the mirroring operations (the JDO 2 event listeners). Defaults to false.


setIgnoreMirrorExceptions

public void setIgnoreMirrorExceptions(boolean ignoreMirrorExceptions)
Should exceptions be ignored during the mirroring operations (the JDO 2 event listeners). Defaults to false.


doStart

protected void doStart()
                throws CompassGpsException
Description copied from class: AbstractGpsDevice
Derived devices can implement it in case of start event notification.

Overrides:
doStart in class JdoGpsDevice
Throws:
CompassGpsException

doStop

protected void doStop()
               throws CompassGpsException
Description copied from class: AbstractGpsDevice
Derived devices can implement it in case of stop event notification.

Overrides:
doStop in class AbstractGpsDevice
Throws:
CompassGpsException


Copyright (c) 2004-2008 The Compass Project.