public abstract class DecoratorHeaplet extends Object implements Heaplet
It supports an additional start()
lifecycle method that is performed within the (Name, JsonValue, Heap)
method.
This class does not attempt to perform any heap object extraction/resolution when creating objects.
Modifier and Type | Field and Description |
---|---|
protected org.forgerock.json.JsonValue |
config
The heaplet's object configuration object.
|
protected Heap |
heap
Where objects should be put and where object dependencies should be retrieved.
|
protected Name |
name
The fully qualified name of the object to be created.
|
protected Decorator |
object
The object created by the heaplet's
create() method. |
Modifier | Constructor and Description |
---|---|
protected |
DecoratorHeaplet()
Can only be called by sub-classes.
|
Modifier and Type | Method and Description |
---|---|
abstract Decorator |
create()
Called to request the heaplet create an object.
|
Object |
create(Name name,
org.forgerock.json.JsonValue config,
Heap heap)
Called to request the heaplet to create an object.
|
void |
destroy()
Called to indicate that the object created by the heaplet is going to be dereferenced.
|
void |
start()
Called to request the heaplet start an object.
|
protected Name name
protected org.forgerock.json.JsonValue config
protected Heap heap
public Object create(Name name, org.forgerock.json.JsonValue config, Heap heap) throws HeapException
Heaplet
create
in interface Heaplet
name
- the name of the object to be created.config
- the heaplet's configuration object.heap
- the heap where object dependencies can be retrieved.HeapException
- if an exception occurred during creation of the object or any of its dependencies.public void destroy()
Heaplet
public abstract Decorator create() throws HeapException
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 start()
method.HeapException
- if an exception occurred during creation of the heap object
or any of its dependencies.org.forgerock.json.JsonValueException
- if the heaplet (or one of its dependencies) has a malformed
configuration.public void start() throws HeapException
create(Name, JsonValue, Heap)
after creating and
configuring the object. Implementations should override this method if they need to
acquire resources, start threads, or log any initialization messages.HeapException
- if an exception occurred while starting the heap object or
any of its dependencies.Copyright © 2025 Open Identity Platform Community. All rights reserved.