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 classCreates 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 theThrottlingRatethat 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: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.
-