java.lang.Object
io.helidon.inject.api.CallingContextFactory
Deprecated, for removal: This API element is subject to removal in a future version.
Helidon inject is deprecated and will be replaced in a future version
Factory for creating
CallingContext and builders for the calling context.
After a calling context builder is created, it should be amended with as much contextual information as possible, and then
optionally set globally using globalCallingContext(CallingContext, boolean).-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<CallingContext> create(boolean force) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new calling context instance.static Optional<CallingContext.Builder> createBuilder(boolean force) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new calling context builder instance.static voidglobalCallingContext(CallingContext callingContext, boolean throwIfAlreadySet) Deprecated, for removal: This API element is subject to removal in a future version.Sets the default global calling context.
-
Method Details
-
globalCallingContext
Deprecated, for removal: This API element is subject to removal in a future version.Sets the default global calling context.- Parameters:
callingContext- the default global contextthrowIfAlreadySet- should an exception be thrown if the global calling context was already set- Throws:
IllegalStateException- if context was already set and the throwIfAlreadySet is active
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new calling context instance. Normally this method will return a context optionally only when debug is enabled. This behavior can be overridden by passing theforce=trueflag.- Parameters:
force- forces the creation of the calling context even when debug is disabled- Returns:
- a new calling context if there is an indication that debug mode is enabled, or if the force flag is set
- See Also:
-
createBuilder
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new calling context builder instance. Normally this method will return a context builder optionally only when debug is enabled. This behavior can be overridden by passing theforce=trueflag.- Parameters:
force- forces the creation of the calling context even when debug is disabled- Returns:
- a new calling context builder if there is an indication that debug mode is enabled, or if the force flag is set
- See Also:
-