Package nl.stokpop.eventscheduler.api
Interface Event
-
- All Known Implementing Classes:
EventAdapter,EventDefault
public interface EventThis 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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidabortTest()Called for test abort.voidafterTest()Called after the test run is done.default java.util.Collection<java.lang.String>allowedCustomEvents()voidbeforeTest()Called before the test run starts.EventCheckcheck()Called to check test results (for example the requirements are checked).voidcustomEvent(CustomEvent scheduleEvent)Called for each custom event, according to the custom even schedule.java.lang.StringgetName()voidkeepAlive()Called for each keep alive event for this test run.voidstartTest()Called when test run actually starts.
-
-
-
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
-
-