class QueueListenerImpl implements QueueListener {

    @Override
    public void onTerminated(List<ExecutionMessage> messages) {
        ScoreEvent[] scoreEvents = handleTerminatedMessages(messages);
        if (scoreEvents.length > 0) {
            try {
                eventBus.dispatch(scoreEvents);
            } catch (InterruptedException e) {
                logger.error("Thread is interrupted. Ignoring... ", e);
            }
        }
    }

}