net.sf.bt747.gps.mtk.agps
Class AgpsUploadHandler

java.lang.Object
  extended by net.sf.bt747.gps.mtk.agps.AgpsUploadHandler
All Implemented Interfaces:
DeviceOperationHandlerIF

public class AgpsUploadHandler
extends java.lang.Object
implements DeviceOperationHandlerIF

Serial handler for AGPS data upload.

Author:
Mario De Weerd

Constructor Summary
AgpsUploadHandler()
           
AgpsUploadHandler(EventPoster poster)
           
 
Method Summary
 boolean analyseResponse(java.lang.Object o)
          These methods are called one after the other - not in separate threads.
 boolean notifyRun(GpsLinkHandler handler)
          This method is called on regular intervals (every 10ms or so) so that this Handler can send commands to the device as needed.
 void setAgpsData(BT747InputStream is)
          Sets the data stream to fetch the AGPS data from.
 void setAgpsData(byte[] data)
          Uses the bytes data as AGPS data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgpsUploadHandler

public AgpsUploadHandler(EventPoster poster)

AgpsUploadHandler

public AgpsUploadHandler()
Method Detail

analyseResponse

public boolean analyseResponse(java.lang.Object o)
These methods are called one after the other - not in separate threads.

Specified by:
analyseResponse in interface DeviceOperationHandlerIF
Parameters:
o - The receive packet.
Returns:
true if the packet was treated and should not be treated elsewhere in the application.

notifyRun

public boolean notifyRun(GpsLinkHandler handler)
                  throws BT747Exception
Description copied from interface: DeviceOperationHandlerIF
This method is called on regular intervals (every 10ms or so) so that this Handler can send commands to the device as needed.

Specified by:
notifyRun in interface DeviceOperationHandlerIF
Parameters:
handler - The handler to use the serial link.
Returns:
true if handler must be maintained. If false, handler will no longer be called and dereferenced in the link controller.
Throws:
BT747Exception

setAgpsData

public final void setAgpsData(BT747InputStream is)
Sets the data stream to fetch the AGPS data from. This interface allows some flexibility in the actual source.

Parameters:
is -

setAgpsData

public final void setAgpsData(byte[] data)
Uses the bytes data as AGPS data.

Parameters:
data -