|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.gps.device.AbstractGpsDeviceWrapper
org.compass.gps.device.AbstractMirrorGpsDeviceWrapper
org.compass.gps.device.ScheduledMirrorGpsDevice
public class ScheduledMirrorGpsDevice
For ActiveMirrorGpsDevices, the schedule mirror
device can call the
ActiveMirrorGpsDevice.performMirroring() in a
scheduled manner by wrapping the actual
ActiveMirrorGpsDevice.
ActiveMirrorGpsDevice interface, and provides access
to the wrapped gps device using the getWrappedGpsDevice().
For scheduling, the schedule mirror device uses the
java.util.Timer, and provides controll over the period,
daemon, and fixed rate parameters.
| Constructor Summary | |
|---|---|
ScheduledMirrorGpsDevice()
Creates a new instance. |
|
ScheduledMirrorGpsDevice(ActiveMirrorGpsDevice gpsDevice)
Creates a new instance of the scheduled device with the wrapped ActiveMirrorGpsDevice initialized. |
|
| Method Summary | |
|---|---|
long |
getPeriod()
The period of the scheduled service in milli-seconds. |
ActiveMirrorGpsDevice |
getWrappedGpsDevice()
Returns the wrapped active mirror gps device. |
boolean |
isDaemon()
If the scheduled timer whould work as a daemon thread or not. |
void |
performMirroring()
Performs the actual mirror operation, delegating the action to the wrapped gps device. |
void |
setDaemon(boolean daemon)
Sets if the scheduled timer would work as a daemon thread or not. |
void |
setGpsDevice(CompassGpsDevice gpsDevice)
Checks that when setting the wrapped gps device, it is of type ActiveMirrorGpsDevice |
void |
setPeriod(long period)
Sets the period of the scheduled service in milli-seconds. |
void |
setWrappedGpsDevice(ActiveMirrorGpsDevice gpsDevice)
Sets the wrapped gps device. |
void |
start()
Starts the scheduled timer. |
void |
stop()
Stops the scheduled timer. |
| Methods inherited from class org.compass.gps.device.AbstractMirrorGpsDeviceWrapper |
|---|
isMirrorDataChanges, setMirrorDataChanges |
| Methods inherited from class org.compass.gps.device.AbstractGpsDeviceWrapper |
|---|
checkDeviceSet, getGps, getName, index, injectGps, isPerformingIndexOperation, isRunning, refresh, setName, shouldMirrorDataChanges |
| 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.MirrorDataChangesGpsDevice |
|---|
isMirrorDataChanges, setMirrorDataChanges |
| Methods inherited from interface org.compass.gps.CompassGpsDevice |
|---|
getGps, getName, index, injectGps, isPerformingIndexOperation, isRunning, refresh, setName, shouldMirrorDataChanges |
| Constructor Detail |
|---|
public ScheduledMirrorGpsDevice()
setGpsDevice and it must implement the .
public ScheduledMirrorGpsDevice(ActiveMirrorGpsDevice gpsDevice)
ActiveMirrorGpsDevice initialized.
gpsDevice - | Method Detail |
|---|
public void setGpsDevice(CompassGpsDevice gpsDevice)
ActiveMirrorGpsDevice
setGpsDevice in class AbstractGpsDeviceWrapper
public void start()
throws CompassGpsException
start in interface CompassGpsDevicestart in class AbstractGpsDeviceWrapperCompassGpsException
public void stop()
throws CompassGpsException
stop in interface CompassGpsDevicestop in class AbstractGpsDeviceWrapperCompassGpsExceptionpublic ActiveMirrorGpsDevice getWrappedGpsDevice()
public void setWrappedGpsDevice(ActiveMirrorGpsDevice gpsDevice)
public void performMirroring()
throws CompassGpsException
performMirroring in interface ActiveMirrorGpsDeviceCompassGpsExceptionpublic boolean isDaemon()
public void setDaemon(boolean daemon)
public long getPeriod()
public void setPeriod(long period)
period -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||