Class ScriptableThrottlingPolicy
- java.lang.Object
-
- org.forgerock.openig.script.AbstractScriptableHeapObject<ThrottlingRate>
-
- org.forgerock.openig.filter.throttling.ScriptableThrottlingPolicy
-
- All Implemented Interfaces:
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 byAbstractScriptableHeapObject.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScriptableThrottlingPolicy.HeapletCreates and initializes a scriptable object in a heap environment.-
Nested classes/interfaces inherited from class org.forgerock.openig.script.AbstractScriptableHeapObject
AbstractScriptableHeapObject.AbstractScriptableHeaplet
-
-
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.-
Methods inherited from class org.forgerock.openig.script.AbstractScriptableHeapObject
runScript, setArgs, setClientHandler
-
-
-
-
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.
-
-