public static interface ContextManager.Builder
ContextManager
.ContextManager.Builder withThreadContextProviders(ThreadContextProvider... providers)
ThreadContextProvider
instances.providers
- the ThreadContextProvider
instances to use.ContextManager.Builder addDiscoveredContextManagerExtensions()
ContextManagerExtension
instances via the ServiceLoader
mechanism on the current thread-context ClassLoader
(unless overridden by forClassLoader(ClassLoader)
).ContextManager.Builder withContextManagerExtensions(ContextManagerExtension... extensions)
ContextManagerExtension
instances.extensions
- the ContextManagerExtension
instances to use.ContextManager.Builder addDiscoveredThreadContextProviders()
ThreadContextProvider
instances via the ServiceLoader
mechanism on the current thread-context ClassLoader
(unless overridden by forClassLoader(ClassLoader)
).ContextManager.Builder forClassLoader(ClassLoader classLoader)
ClassLoader
for addDiscoveredThreadContextProviders()
instead
of the current thread-context ClassLoader
.classLoader
- the ClassLoader
to use for addDiscoveredThreadContextProviders()
ContextManager.Builder withDefaultExecutorService(ExecutorService executorService)
ExecutorService
to execute async tasks for contextualised
CompletableFuture
and CompletionStage
when no executor is specified.executorService
- the ExecutorService
to use for async tasks when
no executor is specified.ContextManager build()
Creates a new ContextManager
with the specified configuration.
Creating a ContextManager
will load and invoke all related
ContextManagerExtension
as described in its documentation.
ContextManager
with the specified configuration.Copyright © 2018 ‘ 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.