Instead of having lots of objects implement Comparable or Comparator,
pass the comparator in to the PriorityBlockingQueue.
This requires recreating the queue if the QueueHandler is ever changed,
but the previous behaviour resulted in an unstable/undefined ordering,
so it's probably better this way anyway.
This means that QueueItems no longer need to know about QueueHandler,
which makes me slightly happier.
This allows the logic to be expressed more nicely and tested
independently of the handlers. It also paves the way for a
bit of refactoring to reduce the number of random things
that need to be comparable...
Use Java8 date types for parser queue items. Fix the time check in
QueueHandler to check if the item has been queued for longer than
10 seconds, rather than if the item was created within 10 seconds
of the epoch.
OutputHandlers are now incharge of creating QueueItems and comparing them.
Parser now allows for replacing the OutputQueue entirely
Default OutputQueue allows replacing of the OutputHandler (by giving it a new QueueFactory that outputs the alternative QueueHandler)
Sending PING is now High Priority
QueueItems now sort by a unique itemNumber not time, as priority queue doesn't guarentee order for itesm of teh same priority created at the same time
Add a rate-limited OutputQueue