Package org.forgerock.openig.script
Class AbstractScriptableHeapObject.AbstractScriptableHeaplet<V>
java.lang.Object
org.forgerock.openig.heap.GenericHeaplet
org.forgerock.openig.script.AbstractScriptableHeapObject.AbstractScriptableHeaplet<V>
- Type Parameters:
V
- The expected type of the heaplet.
- All Implemented Interfaces:
Heaplet
- Direct Known Subclasses:
ScriptableAccessTokenResolver.Heaplet
,ScriptableFilter.Heaplet
,ScriptableHandler.Heaplet
,ScriptableIdentityAssertionPlugin.Heaplet
,ScriptableIdentityAssertionPluginTechPreview.Heaplet
,ScriptableJwtValidatorCustomizer.Heaplet
,ScriptableResourceAccess.Heaplet
,ScriptableResourceUriProvider.Heaplet
,ScriptableThrottlingPolicy.Heaplet
- Enclosing class:
- AbstractScriptableHeapObject<V>
protected abstract static class AbstractScriptableHeapObject.AbstractScriptableHeaplet<V>
extends GenericHeaplet
Creates and initializes a scriptable heap object in a heap environment.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Called to request the heaplet create an object.void
destroy()
Called to indicate that the object created by the heaplet is going to be dereferenced.protected abstract AbstractScriptableHeapObject<V>
newInstance
(Script script, Heap heap) Creates the new heap object instance using the provided script.Methods inherited from class org.forgerock.openig.heap.GenericHeaplet
create, endpointRegistry, evaluatedWithHeapProperties, expression, getConfig, getHeap, getType, initialBindings, meterRegistryHolder, start
-
Constructor Details
-
AbstractScriptableHeaplet
protected AbstractScriptableHeaplet()
-
-
Method Details
-
create
Description copied from class:GenericHeaplet
Called to request the heaplet create an object. Called byHeaplet.create(Name, JsonValue, Heap)
after initializing the protected field members. Implementations should parse configuration but not acquire resources, start threads, or log any initialization messages. These tasks should be performed by theGenericHeaplet.start()
method.- Specified by:
create
in classGenericHeaplet
- Returns:
- The created object.
- Throws:
HeapException
- if an exception occurred during creation of the heap object or any of its dependencies.
-
destroy
public void destroy()Description copied from interface:Heaplet
Called to indicate that the object created by the heaplet is going to be dereferenced. This gives the heaplet an opportunity to free any resources that are being held prior to its dereference.- Specified by:
destroy
in interfaceHeaplet
- Overrides:
destroy
in classGenericHeaplet
-
newInstance
protected abstract AbstractScriptableHeapObject<V> newInstance(Script script, Heap heap) throws HeapException Creates the new heap object instance using the provided script.- Parameters:
script
- The compiled script.heap
- The heap to look for bindings- Returns:
- The new heap object instance using the provided script.
- Throws:
HeapException
- if an exception occurred during creation of the heap object or any of its dependencies.JsonValueException
- if the heaplet (or one of its dependencies) has a malformed configuration.
-