com.tractrac.clientmodule.data
Class DataController
java.lang.Object
com.tractrac.clientmodule.data.DataController
- All Implemented Interfaces:
- java.lang.Runnable
public class DataController
- extends java.lang.Object
- implements java.lang.Runnable
The main class for data subscription/retrieval.
- Version:
- 2.0
- Author:
- jmr
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataController
public DataController(java.net.URI liveUri,
java.net.URI storedUri,
DataController.Listener listener)
throws java.io.FileNotFoundException,
java.net.MalformedURLException
- Creates a data controller to be used when subscribing data.
Supported live data URI's:
Supported stored data URI's:
tcp://example.com:1234
http://example.com/stored.mtb
file:/c:/tests/stored.mtb
- Parameters:
liveUri - the URI for live data. null is allowed, in which case
no live data will be received.storedUri - the URI for stored data. null is allowed, in which case
no stored data will be received.listener -
- Throws:
java.io.FileNotFoundException
java.net.MalformedURLException
hasLiveData
public boolean hasLiveData()
hasStoredData
public boolean hasStoredData()
add
public void add(com.maptrack.client.io.TypeController typeController)
- Adds a subscription to the TTCM.
May be called before or after executing the
run method.
- Parameters:
typeController -
remove
public void remove(com.maptrack.client.io.TypeController typeController)
- Cancels a subscription from the TTCM.
May be called before or after executing the
run method.
- Parameters:
typeController -
run
public void run()
- Specified by:
run in interface java.lang.Runnable
getUtcTime
public void getUtcTime(DataController.TimeListener timeListener)
stop
public void stop(boolean abortStored)