Class ScriptableThrottlingPolicy
java.lang.Object
org.forgerock.openig.script.AbstractScriptableHeapObject<ThrottlingRate>
org.forgerock.openig.filter.throttling.ScriptableThrottlingPolicy
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ThrottlingPolicy
public class ScriptableThrottlingPolicy
extends AbstractScriptableHeapObject<ThrottlingRate>
implements ThrottlingPolicy
A scriptable throttling datasource. This throttling datasource acts as a simple wrapper around the
scripting engine. Scripts are provided with the bindings provided by
AbstractScriptableHeapObject
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Creates and initializes a scriptable object in a heap environment.Nested classes/interfaces inherited from class org.forgerock.openig.script.AbstractScriptableHeapObject
AbstractScriptableHeapObject.AbstractScriptableHeaplet<V>
-
Method Summary
Modifier and TypeMethodDescriptionReturns theThrottlingRate
that should be used for the provided request.Methods inherited from class org.forgerock.openig.script.AbstractScriptableHeapObject
close, runScript, runScriptAsync, setArgs, setClientHandler
-
Method Details
-
lookup
Description copied from interface:ThrottlingPolicy
Returns theThrottlingRate
that should be used for the provided request.- Specified by:
lookup
in 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
Promise
representing theThrottlingRate
that should be used for the request.
-