java.lang.Object
io.helidon.pico.api.CallingContext
For internal use only to Helidon. Applicable when
PicoServicesConfig.TAG_DEBUG is enabled.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHelpful hint to give developers needing to see more debug info. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedThis needs to be private since a generated builder will be extending this. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidglobalCallingContext(CallingContext callingContext, boolean throwIfAlreadySet) Sets the default global calling context.Only populated whenPicoServicesConfig.TAG_MODULE_NAMEis set.abstract StringThe thread that created the calling context.static StringtoErrorMessage(CallingContext callingContext, String msg) Convenience method for producing an error message that may involve advising the user to apply a debug mode.static StringtoErrorMessage(String msg) Convenience method for producing an error message that may involve advising the user to apply a debug mode.toString()abstract StackTraceElement[]trace()Only populated whenPicoServicesConfig.TAG_DEBUGis set.
-
Field Details
-
DEBUG_HINT
Helpful hint to give developers needing to see more debug info.- See Also:
-
-
Constructor Details
-
CallingContext
protected CallingContext()This needs to be private since a generated builder will be extending this.
-
-
Method Details
-
toString
-
trace
Only populated whenPicoServicesConfig.TAG_DEBUGis set.- Returns:
- the stack trace for who initialized
-
moduleName
Only populated whenPicoServicesConfig.TAG_MODULE_NAMEis set.- Returns:
- the module name
-
threadName
The thread that created the calling context.- Returns:
- thread creating the calling context
-
globalCallingContext
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
-
toErrorMessage
Convenience method for producing an error message that may involve advising the user to apply a debug mode.- Parameters:
callingContext- the calling context (caller can be using a custom calling context, which is why we accept it here instead of using the global one)msg- the base message to display- Returns:
- the message appropriate for any exception being thrown
-
toErrorMessage
Convenience method for producing an error message that may involve advising the user to apply a debug mode. UsetoErrorMessage(CallingContext, String)iinstead f a calling context is available.- Parameters:
msg- the base message to display- Returns:
- the message appropriate for any exception being thrown
- See Also:
-