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 Details

  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • context

      @Nullable public String context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component
    • parent

      @Nullable public RequestTrace parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • data

      @Nullable public Object data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component