Use a unbounded FIFO Queue object (ConcurrentLinkedQueue) as backing data structure instead of ArrayList. This extends the current functionality with the possibility to pop/poll (i.e. get and remove) single received messages. Before, one could only clear all messages.
The Queue Interface is more or less a superset of the List interface, so existing code can be adapted very easily.
Use a unbounded FIFO Queue object (ConcurrentLinkedQueue) as backing data structure instead of ArrayList. This extends the current functionality with the possibility to pop/poll (i.e. get and remove) single received messages. Before, one could only clear all messages. The Queue Interface is more or less a superset of the List interface, so existing code can be adapted very easily.