Package org.apache.maven.api.services
Record Class RequestTrace
java.lang.Object
java.lang.Record
org.apache.maven.api.services.RequestTrace
- Record Components:
context
- The context identifier for this request trace, helping to identify the scope or purpose of the request. May be null if no specific context is needed.parent
- The parent request trace that led to this request, establishing the chain of nested operations. May be null for top-level requests.data
- Additional data associated with this request trace, typically containing the actual request object being processed or any application-specific state information. May be null if no additional data is needed.
public record RequestTrace(@Nullable String context, @Nullable RequestTrace parent, @Nullable Object data)
extends Record
Represents a hierarchical trace of nested requests within a session, enabling correlation between
session events and their originating operations in the application code. The trace structure
supports the following key features:
- Maintains parent-child relationships between requests to track operation nesting
- Carries contextual data describing the current request or operation
- Supports both internal session operations and client-provided trace information
For internal session operations, the trace typically contains *Request
objects
that represent the current processing state. Client code can also create traces with
application-specific data to provide context when invoking session methods.
This trace information is particularly useful for:
- Debugging and troubleshooting request flows
- Audit logging of session operations
- Performance monitoring of nested operations
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRequestTrace
(String context, RequestTrace parent, Object data) Creates an instance of aRequestTrace
record class.RequestTrace
(RequestTrace parent, Object data) -
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns the value of thecontext
record component.data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.parent()
Returns the value of theparent
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
CONTEXT_PLUGIN
- See Also:
-
CONTEXT_PROJECT
- See Also:
-
CONTEXT_BOOTSTRAP
- See Also:
-
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
context
Returns the value of thecontext
record component.- Returns:
- the value of the
context
record component
-
parent
Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-