java.lang.Object
io.helidon.pico.api.CallingContextFactory
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 CallingContext.globalCallingContext(CallingContext, boolean).-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<CallingContext>create(boolean force) Creates a new calling context instance.static Optional<io.helidon.pico.api.DefaultCallingContext.Builder>createBuilder(boolean force) Creates a new calling context builder instance.
-
Method Details
-
create
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
public static Optional<io.helidon.pico.api.DefaultCallingContext.Builder> createBuilder(boolean force) 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:
-