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.BuilderaddDiscoveredContextManagerExtensions()SmallRyeContextManager.BuilderaddDiscoveredThreadContextProviders()SmallRyeContextManagerbuild()SmallRyeContextManager.BuilderforClassLoader(ClassLoader classLoader)SmallRyeContextManager.BuilderwithContextManagerExtensions(org.eclipse.microprofile.context.spi.ContextManagerExtension... propagators)SmallRyeContextManager.BuilderwithDefaultExecutorService(ExecutorService executorService)Make all createdSmallRyeManagedExecutorforward to the given executor service by default instead of creating new executor services to back them.SmallRyeContextManager.BuilderwithThreadContextProviders(org.eclipse.microprofile.context.spi.ThreadContextProvider... providers)
-
-
-
Method Detail
-
withThreadContextProviders
public SmallRyeContextManager.Builder withThreadContextProviders(org.eclipse.microprofile.context.spi.ThreadContextProvider... providers)
- Specified by:
withThreadContextProvidersin interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
addDiscoveredThreadContextProviders
public SmallRyeContextManager.Builder addDiscoveredThreadContextProviders()
- Specified by:
addDiscoveredThreadContextProvidersin interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
withContextManagerExtensions
public SmallRyeContextManager.Builder withContextManagerExtensions(org.eclipse.microprofile.context.spi.ContextManagerExtension... propagators)
- Specified by:
withContextManagerExtensionsin interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
addDiscoveredContextManagerExtensions
public SmallRyeContextManager.Builder addDiscoveredContextManagerExtensions()
- Specified by:
addDiscoveredContextManagerExtensionsin interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
forClassLoader
public SmallRyeContextManager.Builder forClassLoader(ClassLoader classLoader)
- Specified by:
forClassLoaderin interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
build
public SmallRyeContextManager build()
- Specified by:
buildin interfaceorg.eclipse.microprofile.context.spi.ContextManager.Builder
-
withDefaultExecutorService
public SmallRyeContextManager.Builder withDefaultExecutorService(ExecutorService executorService)
Make all createdSmallRyeManagedExecutorforward 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 allCompletionStageandCompletableFuturewrapped byThreadContext.- Parameters:
executorService- the executor service to delegate to. Ifnull, all createdManagedExecutorwill create new backing executor services, and all*Asyncmethods of theCompletionStageandCompletableFuturewrapped byThreadContextwill throw due to a lack of executor.- Returns:
- this builder.
-
-