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 classDefaultLauncherSession.ClosedLauncher
-
Field Summary
Fields Modifier and Type Field Description private LauncherInterceptorinterceptorprivate DelegatingLauncherlauncherprivate LauncherSessionListenerlistenerprivate static LauncherInterceptorNOOP_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 voidclose()Close this session and notify all registeredLauncherSessionListeners.private static LauncherInterceptorcomposite(java.util.List<LauncherInterceptor> interceptors)LaunchergetLauncher()Get theLauncherassociated with this session.(package private) LauncherSessionListenergetListener()
-
-
-
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:LauncherSessionGet theLauncherassociated with this session.Any call to the launcher returned by this method after the session has been closed will throw an exception.
- Specified by:
getLauncherin interfaceLauncherSession
-
getListener
LauncherSessionListener getListener()
-
close
public void close()
Description copied from interface:LauncherSessionClose this session and notify all registeredLauncherSessionListeners.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceLauncherSession
-
composite
private static LauncherInterceptor composite(java.util.List<LauncherInterceptor> interceptors)
-
-