Class DiagnosticAttributeInterceptor
- All Implemented Interfaces:
AttributeInterceptor
AttributeInterceptor.
Wraps every domain-attribute resolution in a DOMAIN_ATTRIBUTE call-stack frame.
When the attribute is the top-level entry point (stack empty before push) the collected
events are aggregated into a summary and handed to the DiagnosticCallStackFlushStrategy. The strategy
decides whether to dispatch the report to the diagnostic queue (production) or preserve the
stack for later inspection (tester).
An optional delegate AttributeInterceptor may be supplied at construction
time: its getValue is called inside the diagnostic frame instead of going directly to
the resolver — so all engine calls made by the user interceptor are captured as children of the
DOMAIN_ATTRIBUTE frame. When no delegate is supplied a no-op one is used (it forwards
straight to the resolver), so chaining is allocation-free per call.
The elementName recorded in the frame is built as
objectPath + "{" + attrCode + "}", e.g. "/vehicles/car{RATE}", using
DomainAttribute.getDomainObject() and its getPath() method.
The attribute code is wrapped in {} to visually distinguish it from path segments.
Registered by HigsonEngineFactory only when
profilerEnabled = true.
-
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticAttributeInterceptor(DiagnosticCallStackFlushStrategy flushStrategy, String instanceId) DiagnosticAttributeInterceptor(DiagnosticCallStackFlushStrategy flushStrategy, String instanceId, AttributeInterceptor delegate) -
Method Summary
Modifier and TypeMethodDescriptiongetValue(AttributeValueResolver resolver, DomainAttribute attr, ParamContext ctx, Object... args) This method allows provide custom handling of parameters for domain attributes.
-
Constructor Details
-
DiagnosticAttributeInterceptor
public DiagnosticAttributeInterceptor(DiagnosticCallStackFlushStrategy flushStrategy, String instanceId) -
DiagnosticAttributeInterceptor
public DiagnosticAttributeInterceptor(DiagnosticCallStackFlushStrategy flushStrategy, String instanceId, AttributeInterceptor delegate)
-
-
Method Details
-
getValue
public ParamValue getValue(AttributeValueResolver resolver, DomainAttribute attr, ParamContext ctx, Object... args) Description copied from interface:AttributeInterceptorThis method allows provide custom handling of parameters for domain attributes.- Specified by:
getValuein interfaceAttributeInterceptor- Parameters:
resolver- attribute value resolverattr- attribute from which value and type will be fetchedctx- context required for finding proper valueargs- possible arguments if attribute is defined as function- Returns:
- possible values
-