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,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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Called to request the heaplet create an object.voiddestroy()Releases observability resources: deregisters the HTTP endpoint, all meters, and startup metrics.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:GenericHeapletCalled 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:
createin 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 class:GenericHeapletReleases observability resources: deregisters the HTTP endpoint, all meters, and startup metrics.Subclasses that override this method must call
super.destroy()last, after releasing their own domain resources. This ensures that monitoring remains active for the full lifetime of those resources and that any metrics emitted during shutdown are not lost.- Specified by:
destroyin interfaceHeaplet- Overrides:
destroyin 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.
-