com.nutiteq.location.cellid
Class OnlineCellIdService

java.lang.Object
  extended by com.nutiteq.location.cellid.OnlineCellIdService
All Implemented Interfaces:
ResourceDataWaiter, ResourceRequestor, CellIdService
Direct Known Subclasses:
OpenCellIdService

public abstract class OnlineCellIdService
extends java.lang.Object
implements CellIdService, ResourceRequestor, ResourceDataWaiter


Constructor Summary
OnlineCellIdService()
           
 
Method Summary
abstract  java.lang.String createRequestUrl(java.lang.String cellId, java.lang.String lac, java.lang.String mcc, java.lang.String mnc)
           
 void dataRetrieved(byte[] data)
          Data for resource retrieved
 int getCachingLevel()
          Define at which level should given resource be cached.
 void notifyError()
          Notify implementing object about retrieval error
abstract  void parseResponse(CellIdResponseWaiter responseWaiter, java.lang.String response)
           
 java.lang.String resourcePath()
          Get path to resource.
 void retrieveLocation(java.lang.String cellId, java.lang.String lac, java.lang.String mcc, java.lang.String mnc)
          Retrieve location with given cellid information
 void setResponseWaiter(CellIdResponseWaiter responseWaiter)
          Set object waiting for response from this service
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineCellIdService

public OnlineCellIdService()
Method Detail

setResponseWaiter

public void setResponseWaiter(CellIdResponseWaiter responseWaiter)
Description copied from interface: CellIdService
Set object waiting for response from this service

Specified by:
setResponseWaiter in interface CellIdService
Parameters:
responseWaiter - response waiting object

retrieveLocation

public void retrieveLocation(java.lang.String cellId,
                             java.lang.String lac,
                             java.lang.String mcc,
                             java.lang.String mnc)
Description copied from interface: CellIdService
Retrieve location with given cellid information

Specified by:
retrieveLocation in interface CellIdService
Parameters:
cellId - cell id as hex number
lac - location area code as hex number
mcc - mobile country code
mnc - mobile network code

resourcePath

public java.lang.String resourcePath()
Description copied from interface: ResourceRequestor
Get path to resource. Currently library supports retrieval from network and application jar

Specified by:
resourcePath in interface ResourceRequestor
Returns:
path to resource

notifyError

public void notifyError()
Description copied from interface: ResourceRequestor
Notify implementing object about retrieval error

Specified by:
notifyError in interface ResourceRequestor

dataRetrieved

public void dataRetrieved(byte[] data)
Description copied from interface: ResourceDataWaiter
Data for resource retrieved

Specified by:
dataRetrieved in interface ResourceDataWaiter
Parameters:
data - retrieved data

getCachingLevel

public int getCachingLevel()
Description copied from interface: ResourceRequestor
Define at which level should given resource be cached. Check Cache

Specified by:
getCachingLevel in interface ResourceRequestor
Returns:
cache level for resource

parseResponse

public abstract void parseResponse(CellIdResponseWaiter responseWaiter,
                                   java.lang.String response)

createRequestUrl

public abstract java.lang.String createRequestUrl(java.lang.String cellId,
                                                  java.lang.String lac,
                                                  java.lang.String mcc,
                                                  java.lang.String mnc)