Class SimpleEventBus

  • All Implemented Interfaces:
    EventBus

    @Internal
    public class SimpleEventBus
    extends Object
    implements EventBus
    This super simple event bus should be used in testing only to assert certain events got pushed through.
    • Constructor Detail

      • SimpleEventBus

        public SimpleEventBus​(boolean ignoreSystemEvents)
        Creates a new SimpleEventBus.

        Note that in general you want to ignore system events since they add nondeterminism during assertions when things like garbage collections happen. Of course if you need to test/verify system events, set the argument to false.

        Parameters:
        ignoreSystemEvents - true if they should be ignored (recommended), false otherwise.
      • SimpleEventBus

        public SimpleEventBus​(boolean ignoreSystemEvents,
                              List<Class<? extends Event>> othersToIgnore)
        Creates a new SimpleEventBus.

        Note that in general you want to ignore system events since they add nondeterminism during assertions when things like garbage collections happen. Of course if you need to test/verify system events, set the argument to false.

        Parameters:
        ignoreSystemEvents - true if they should be ignored (recommended), false otherwise.
        othersToIgnore - other list of events to ignore.