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.
  • Constructor Details

    • AbstractScriptableHeaplet

      protected AbstractScriptableHeaplet()
  • Method Details

    • create

      public Object create() throws HeapException
      Description copied from class: GenericHeaplet
      Called to request the heaplet create an object. Called by Heaplet.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 the GenericHeaplet.start() method.
      Specified by:
      create in class GenericHeaplet
      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 interface Heaplet
      Overrides:
      destroy in class GenericHeaplet
    • 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.