Class DebugEnablement
- Direct Known Subclasses:
- BasicDebugEnablement,- DebugEnablement.Void
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class.classRepresents no DebugEnablement.
- 
Constructor SummaryConstructorsConstructorDescriptionDebugEnablement(BeanStore beanStore) Constructor.DebugEnablement(DebugEnablement.Builder builder) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic DebugEnablement.BuilderStatic creator.protected DebugEnablement.BuilderInitializer.protected booleanisConditionallyEnabled(jakarta.servlet.http.HttpServletRequest req) Returnstrue if debugging is conditionally enabled on the specified request.booleanisDebug(RestContext context, jakarta.servlet.http.HttpServletRequest req) Returnstrue if debug is enabled on the specified class and request.booleanisDebug(RestOpContext context, jakarta.servlet.http.HttpServletRequest req) Returnstrue if debug is enabled on the specified method and request.toString()
- 
Constructor Details- 
DebugEnablementConstructor.Subclasses typically override the init(BeanStore)method when using this constructor.- Parameters:
- beanStore- The bean store containing injectable beans for this enablement.
 
- 
DebugEnablementConstructor.- Parameters:
- builder- The builder for this enablement.
 
 
- 
- 
Method Details- 
createStatic creator.- Parameters:
- beanStore- The bean store to use for creating beans.
- Returns:
- A new builder for this object.
 
- 
initInitializer.Subclasses should override this method to make modifications to the builder used to create this logger. - Parameters:
- beanStore- The bean store containing injectable beans for this logger.
- Returns:
- A new builder object.
 
- 
isDebugReturnstrue if debug is enabled on the specified class and request.This enables debug mode on requests once the matched class is found and before the Java method is found. - Parameters:
- context- The context of the- Rest-annotated class.
- req- The HTTP request.
- Returns:
- true if debug is enabled on the specified method and request.
 
- 
isDebugReturnstrue if debug is enabled on the specified method and request.This enables debug mode after the Java method is found and allows you to enable debug on individual Java methods instead of the entire class. - Parameters:
- context- The context of the- RestOp-annotated method.
- req- The HTTP request.
- Returns:
- true if debug is enabled on the specified method and request.
 
- 
isConditionallyEnabledReturnstrue if debugging is conditionally enabled on the specified request.This method only gets called when the enablement value resolves to CONDITIONAL.Subclasses can override this method to provide their own implementation. The default implementation is provided by DebugEnablement.Builder.conditional(Predicate)which has a default predicate ofx ->"true" .equalsIgnoreCase(x .getHeader("Debug" )- Parameters:
- req- The incoming HTTP request.
- Returns:
- true if debugging is conditionally enabled on the specified request.
 
- 
toString
 
-