public interface NCLifecycle
This interface defines lifecycle hooks for user-defined components that are instantiated by NLPCraft like probe components, custom NER parsers and value loaders. This hooks can be used to integrated with various IoC frameworks, control lifecycle of external libraries and systems, perform initialization and cleanup operations, etc.
Note that probe lifecycle components are configured via nlpcraft.probe.lifecycle
probe
configuration property that accept list of fully qualified class names where each class should implement this
interface. See documentation on how to configure
a data probe.
Modifier and Type | Method and Description |
---|---|
default void |
onDiscard()
Called after lifecycle components is no longer needed.
|
default void |
onInit()
Called before lifecycle component is used and just after its creation.
|
default void onInit()
default void onDiscard()
onInit()
method this call is
optional and not guaranteed. Default implementation is a no-op.Copyright © 2020 NLPCraft. All rights reserved.