Context object representing the state and behavior of a rate-limited method invocation or resource access.
This interface encapsulates the current request, its identifier, the applicable rate limit configuration, and supports recording results (allowed, denied) as well as computing retry times.
Implementations should provide mechanisms for:
- Generating a unique key for the rate-limited entity.
- Checking and recording whether the request is allowed.
- Accessing or updating rate limit metadata.
- Implemented types
- Implementers
- Annotations
-
- @Generic.new(RateLimitOperationContext)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addResource(
Resource< Object, RateLimitEntry> resource) → void -
Adds a single
resourceto the current list of resources.inherited -
generateKey(
[String? preferredKeyGeneratorName]) → FutureOr< Object> - Generates a unique key for the current rate-limited entity.
-
getArgument(
) → ExecutableArgument? -
Represents the arguments passed to a method invocation within JetLeaf’s interception system.
inherited
-
getEnvironment(
) → Environment -
Returns the active
Environmentassociated with the current operation.inherited -
getMethod(
) → Method -
Returns the
Methodcurrently being invoked or associated with this operation context.inherited -
getMethodInvocation(
) → MethodInvocation< T> - Returns the underlying method invocation metadata (target, arguments, etc.).
-
getPodFactory(
) → ConfigurableListablePodFactory -
Returns the
ConfigurableListablePodFactoryassociated with this context.inherited -
getResources(
) → List< Resource< Object, RateLimitEntry> > -
Returns the list of resources associated with the current operation.
inherited
-
getTarget(
) → Object -
Returns the target object associated with the current operation or handler.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveStorages(
RateLimit rateLimit, MethodInvocation invocation) → FutureOr< Iterable< RateLimitStorage> > -
Resolves the appropriate RateLimitStorage instances for a given
RateLimit operation.
inherited
-
setResources(
List< Resource< resources) → voidObject, RateLimitEntry> > -
Replaces the current list of resources with
resources.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited