public class AvlExecutor
extends java.lang.Object
Causes AvlClient.run() to be called on each AvlReport, unless using test executor, in which case the AvlClientTester() is called.
Modifier and Type | Method and Description |
---|---|
static AvlExecutor |
getInstance()
Returns singleton instance.
|
static void |
main(java.lang.String[] args)
For testing.
|
void |
processAvlReport(AvlReport newAvlReport,
boolean... useTestExecutor)
Instead of writing AVL report to JMS topic this method directly processes
it.
|
public static AvlExecutor getInstance()
public void processAvlReport(AvlReport newAvlReport, boolean... useTestExecutor)
Uses a queue so that if system gets behind in processing AVL data then AVL data is written to a queue that keeps track of the latest AVL report per vehicle. If another AVL report is to be added to the queue then the previous one is removed since there is no point processing an old AVL report for a vehicle when new data is available.
Causes AvlClient.run() to be called on each AvlReport, unless using test executor, in which case the AvlClientTester() is called.
newAvlReport
- The AVL report to be processeduseTestExecutor
- So can optional specify that should use a different test
executor for testing out the queuingpublic static void main(java.lang.String[] args)