Package org.junit.platform.launcher
Interface LauncherSessionListener
-
@API(status=EXPERIMENTAL, since="1.8") public interface LauncherSessionListener
Register an implementation of this interface to be notified when aLauncherSession
is opened and closed.A
LauncherSessionListener
can be registered programmatically with theLauncherConfig
passed to theLauncherFactory
or automatically via Java'sServiceLoader
mechanism.All methods in this class have empty default implementations. Subclasses may therefore override one or more of these methods to be notified of the selected events.
The methods declared in this interface are called by the
Launcher
orLauncherSession
created via theLauncherFactory
.
-
-
Field Summary
Fields Modifier and Type Field Description static LauncherSessionListener
NOOP
No-op implementation ofLauncherSessionListener
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
launcherSessionClosed(LauncherSession session)
Called when a launcher session was closed.default void
launcherSessionOpened(LauncherSession session)
Called when a launcher session was opened.
-
-
-
Field Detail
-
NOOP
static final LauncherSessionListener NOOP
No-op implementation ofLauncherSessionListener
-
-
Method Detail
-
launcherSessionOpened
default void launcherSessionOpened(LauncherSession session)
Called when a launcher session was opened.- Parameters:
session
- the opened session
-
launcherSessionClosed
default void launcherSessionClosed(LauncherSession session)
Called when a launcher session was closed.- Parameters:
session
- the closed session
-
-