Module org.junit.platform.launcher
Package org.junit.platform.launcher.core
Class DefaultLauncherSession
- java.lang.Object
-
- org.junit.platform.launcher.core.DefaultLauncherSession
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,LauncherSession
class DefaultLauncherSession extends java.lang.Object implements LauncherSession
- Since:
- 1.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
DefaultLauncherSession.ClosedLauncher
-
Field Summary
Fields Modifier and Type Field Description private LauncherInterceptor
interceptor
private DelegatingLauncher
launcher
private LauncherSessionListener
listener
private static LauncherInterceptor
NOOP_INTERCEPTOR
-
Constructor Summary
Constructors Constructor Description DefaultLauncherSession(java.util.List<LauncherInterceptor> interceptors, java.util.function.Supplier<LauncherSessionListener> listenerSupplier, java.util.function.Supplier<Launcher> launcherSupplier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this session and notify all registeredLauncherSessionListeners
.private static LauncherInterceptor
composite(java.util.List<LauncherInterceptor> interceptors)
Launcher
getLauncher()
Get theLauncher
associated with this session.(package private) LauncherSessionListener
getListener()
-
-
-
Field Detail
-
NOOP_INTERCEPTOR
private static final LauncherInterceptor NOOP_INTERCEPTOR
-
interceptor
private final LauncherInterceptor interceptor
-
listener
private final LauncherSessionListener listener
-
launcher
private final DelegatingLauncher launcher
-
-
Constructor Detail
-
DefaultLauncherSession
DefaultLauncherSession(java.util.List<LauncherInterceptor> interceptors, java.util.function.Supplier<LauncherSessionListener> listenerSupplier, java.util.function.Supplier<Launcher> launcherSupplier)
-
-
Method Detail
-
getLauncher
public Launcher getLauncher()
Description copied from interface:LauncherSession
Get theLauncher
associated with this session.Any call to the launcher returned by this method after the session has been closed will throw an exception.
- Specified by:
getLauncher
in interfaceLauncherSession
-
getListener
LauncherSessionListener getListener()
-
close
public void close()
Description copied from interface:LauncherSession
Close this session and notify all registeredLauncherSessionListeners
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceLauncherSession
-
composite
private static LauncherInterceptor composite(java.util.List<LauncherInterceptor> interceptors)
-
-