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_INTERCEPTORprivate NamespacedHierarchicalStore<Namespace>store
-
Constructor Summary
Constructors Constructor Description DefaultLauncherSession(java.util.List<LauncherInterceptor> interceptors, java.util.function.Supplier<LauncherSessionListener> listenerSupplier, java.util.function.Function<NamespacedHierarchicalStore<Namespace>,Launcher> launcherFactory)
-
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()NamespacedHierarchicalStore<Namespace>getStore()Get theNamespacedHierarchicalStoreassociated with this session.
-
-
-
Field Detail
-
NOOP_INTERCEPTOR
private static final LauncherInterceptor NOOP_INTERCEPTOR
-
store
private final NamespacedHierarchicalStore<Namespace> store
-
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.Function<NamespacedHierarchicalStore<Namespace>,Launcher> launcherFactory)
-
-
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
-
getStore
public NamespacedHierarchicalStore<Namespace> getStore()
Description copied from interface:LauncherSessionGet theNamespacedHierarchicalStoreassociated with this session.All stored values that implement
AutoCloseableare notified by invoking theirclose()methods when this session is closed.Any call to the store returned by this method after the session has been closed will throw an exception.
- Specified by:
getStorein interfaceLauncherSession- See Also:
NamespacedHierarchicalStore
-
composite
private static LauncherInterceptor composite(java.util.List<LauncherInterceptor> interceptors)
-
-