Class FixedRateThrottlingPolicy
- java.lang.Object
-
- org.forgerock.http.filter.throttling.FixedRateThrottlingPolicy
-
- All Implemented Interfaces:
ThrottlingPolicy
public class FixedRateThrottlingPolicy extends Object implements ThrottlingPolicy
An implementation of theThrottlingPolicythat always returns the same throtlling rate.
-
-
Constructor Summary
Constructors Constructor Description FixedRateThrottlingPolicy(ThrottlingRate rate)Constructs a new throttling policy that always returns the same throttling rate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.util.promise.Promise<ThrottlingRate,Exception>lookup(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request)Returns theThrottlingRatethat should be used for the provided request.
-
-
-
Constructor Detail
-
FixedRateThrottlingPolicy
public FixedRateThrottlingPolicy(ThrottlingRate rate)
Constructs a new throttling policy that always returns the same throttling rate.- Parameters:
rate- the rate to return
-
-
Method Detail
-
lookup
public org.forgerock.util.promise.Promise<ThrottlingRate,Exception> lookup(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request)
Description copied from interface:ThrottlingPolicyReturns theThrottlingRatethat should be used for the provided request.- Specified by:
lookupin interfaceThrottlingPolicy- Parameters:
context- The current context which might be used to retrieve the throttling rate.request- The current request which might be used to retrieve the throttling rate.- Returns:
- A
Promiserepresenting theThrottlingRatethat should be used for the request.
-
-