Interface Event

  • All Known Implementing Classes:
    EventAdapter, EventDefault

    public interface Event
    This interface can be implemented in other jars and be put on the classpath. Provide a file in META-INF/services/nl.stokpop.eventscheduler.api.EventFactory that contains the fully qualified name of the factory for a specific event implementation. This class will be used when these events are called. You can provide multiple implementations on the classpath that will all be called. For more information on how this technically works, check out javadoc of java.util.ServiceLoader.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns:
        name of the test event.
      • beforeTest

        void beforeTest()
        Called before the test run starts. You can for instance cleanup the test environment and/or restart the server under test.
      • startTest

        void startTest()
        Called when test run actually starts.
      • afterTest

        void afterTest()
        Called after the test run is done. Use for instance to start creating a report of some sort or remove the test environment.
      • keepAlive

        void keepAlive()
        Called for each keep alive event for this test run.
      • abortTest

        void abortTest()
        Called for test abort.
      • check

        EventCheck check()
        Called to check test results (for example the requirements are checked). Can be used to have a test run fail or succeed in continuous integration setups.
        Returns:
        even check that indicated a failed or successful run for this event.
      • customEvent

        void customEvent​(CustomEvent scheduleEvent)
        Called for each custom event, according to the custom even schedule.
        Parameters:
        scheduleEvent - the custom event, use to execute specific behaviour in the event handler
      • allowedCustomEvents

        default java.util.Collection<java.lang.String> allowedCustomEvents()
        Returns:
        collection of strings for all allowed custom events