Record Class HandlerInterceptor.Context
java.lang.Object
java.lang.Record
dev.restate.sdk.interceptor.HandlerInterceptor.Context
- Record Components:
request- the user-facing handler request (invocation-level data; constant across retry attempts).attemptHeaders- Restate-protocol-level HTTP headers received on the current attempt (e.g.traceparent,x-restate-invocation-id). Differs across retries.
- Enclosing interface:
HandlerInterceptor
@Experimental
public static record HandlerInterceptor.Context(HandlerRequest request, HeadersAccessor attemptHeaders)
extends Record
Per-invocation context exposed to a
HandlerInterceptor.-
Constructor Summary
ConstructorsConstructorDescriptionContext(HandlerRequest request, HeadersAccessor attemptHeaders) Creates an instance of aContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattemptHeadersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.request()Returns the value of therequestrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Context
Creates an instance of aContextrecord class.- Parameters:
request- the value for therequestrecord componentattemptHeaders- the value for theattemptHeadersrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
request
-
attemptHeaders
Returns the value of theattemptHeadersrecord component.- Returns:
- the value of the
attemptHeadersrecord component
-