getAttributes abstract method

Map<String, Object> getAttributes()

Returns a map of all attributes attached to this request.

Attributes are server-side objects or metadata that can be used to store state or share information during request processing. Attributes are request-scoped and typically used for:

  • Authentication/authorization data
  • Request processing context
  • Intermediate computation results
  • Cross-cutting concern data (logging, metrics, etc.)

Returns

An immutable map containing all request attributes

Example

final attributes = request.getAttributes();
print(attributes['userId']); // "user123"
print(attributes['requestId']); // "req-abc-123"

Lifecycle

Attributes are available throughout the request processing pipeline and are typically cleared when the request is completed.

Implementation

Map<String, Object> getAttributes();