Package io.smallrye.context
Class SmallRyeContextManager.Builder
- java.lang.Object
-
- io.smallrye.context.SmallRyeContextManager.Builder
-
- All Implemented Interfaces:
org.eclipse.microprofile.context.spi.ContextManager.Builder
- Enclosing class:
- SmallRyeContextManager
public static class SmallRyeContextManager.Builder extends Object implements org.eclipse.microprofile.context.spi.ContextManager.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SmallRyeContextManager.Builder
addDiscoveredContextManagerExtensions()
SmallRyeContextManager.Builder
addDiscoveredThreadContextProviders()
SmallRyeContextManager
build()
SmallRyeContextManager.Builder
forClassLoader(ClassLoader classLoader)
SmallRyeContextManager.Builder
withContextManagerExtensions(org.eclipse.microprofile.context.spi.ContextManagerExtension... propagators)
SmallRyeContextManager.Builder
withDefaultExecutorService(ExecutorService executorService)
Make all createdSmallRyeManagedExecutor
forward to the given executor service by default instead of creating new executor services to back them.SmallRyeContextManager.Builder
withThreadContextProviders(org.eclipse.microprofile.context.spi.ThreadContextProvider... providers)
-
-
-
Method Detail
-
withThreadContextProviders
public SmallRyeContextManager.Builder withThreadContextProviders(org.eclipse.microprofile.context.spi.ThreadContextProvider... providers)
- Specified by:
withThreadContextProviders
in interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
addDiscoveredThreadContextProviders
public SmallRyeContextManager.Builder addDiscoveredThreadContextProviders()
- Specified by:
addDiscoveredThreadContextProviders
in interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
withContextManagerExtensions
public SmallRyeContextManager.Builder withContextManagerExtensions(org.eclipse.microprofile.context.spi.ContextManagerExtension... propagators)
- Specified by:
withContextManagerExtensions
in interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
addDiscoveredContextManagerExtensions
public SmallRyeContextManager.Builder addDiscoveredContextManagerExtensions()
- Specified by:
addDiscoveredContextManagerExtensions
in interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
forClassLoader
public SmallRyeContextManager.Builder forClassLoader(ClassLoader classLoader)
- Specified by:
forClassLoader
in interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
build
public SmallRyeContextManager build()
- Specified by:
build
in interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
withDefaultExecutorService
public SmallRyeContextManager.Builder withDefaultExecutorService(ExecutorService executorService)
Make all createdSmallRyeManagedExecutor
forward to the given executor service by default instead of creating new executor services to back them. This can be overridden withSmallRyeManagedExecutor.Builder.withExecutorService(ExecutorService)
andSmallRyeManagedExecutor.Builder.withNewExecutorService()
. Also serves as the default executor to use by allCompletionStage
andCompletableFuture
wrapped byThreadContext
.- Parameters:
executorService
- the executor service to delegate to. Ifnull
, all createdManagedExecutor
will create new backing executor services, and all*Async
methods of theCompletionStage
andCompletableFuture
wrapped byThreadContext
will throw due to a lack of executor.- Returns:
- this builder.
-
-