Class EventBroadcasterAsync

  • All Implemented Interfaces:
    EventBroadcaster

    public class EventBroadcasterAsync
    extends java.lang.Object
    implements EventBroadcaster
    Calls all events in an async manner to avoid the main broadcast thread from being blocked.
    • Field Detail

      • ALL_CALLS_TIME_OUT_SECONDS

        protected static final int ALL_CALLS_TIME_OUT_SECONDS
        See Also:
        Constant Field Values
    • Constructor Detail

      • EventBroadcasterAsync

        public EventBroadcasterAsync​(java.util.Collection<Event> events,
                                     EventLogger logger)
      • EventBroadcasterAsync

        public EventBroadcasterAsync​(java.util.Collection<Event> events)
    • Method Detail

      • broadcastBeforeTest

        public void broadcastBeforeTest()
        The before test calls of all events will run in parallel, but this method will wait for all events to finish before returning. This is to make sure all needed activities before the test have finished before the test will start.
        Specified by:
        broadcastBeforeTest in interface EventBroadcaster
      • broadcastAfterTest

        public void broadcastAfterTest()
        The after test calls of all events will run in parallel, but this method will wait for all events to finish before returning. This is to make sure all needed activities after the test have finished before the test will finish.
        Specified by:
        broadcastAfterTest in interface EventBroadcaster
      • broadcastAbortTest

        public void broadcastAbortTest()
        Blocks for all abort tasks to be finished to try to make sure they get called before jvm shutdown.
        Specified by:
        broadcastAbortTest in interface EventBroadcaster