Abstract Class: Plugin
Represents the base class for all plugins.
Extended by
DataPluginHttpPluginKafkaPluginOpenApiPluginRabbitMQPluginSchedulePluginSecurityPluginWebSocketPlugin
Constructors
Constructor
new Plugin():
Plugin
Returns
Plugin
Properties
options?
protectedoptionaloptions?:PluginOptions
state
protectedstate:PluginLifecycle=PluginLifecycle.Created
stateError?
protectedoptionalstateError?:Error
dependencies?
readonlystaticoptionaldependencies?: (PluginType<Plugin> | {optional:boolean;plugin:PluginType; })[]
Methods
getState()
getState():
PluginLifecycle
Retrieves the current lifecycle state of the plugin.
Returns
The current lifecycle state of the plugin.
getStateError()
getStateError():
Error|undefined
Retrieves the error state of the plugin, if any.
Returns
Error | undefined
The error that caused the plugin to enter the error state, or undefined if no error occurred.
onRegister()?
optionalonRegister(context,options?):void|Promise<void>
Lifecycle method called when the plugin is registered.
Parameters
context
The AxiSparkContext to be passed to the plugin during registration.
options?
The options for the plugin.
Returns
void | Promise<void>
onStart()?
optionalonStart():void|Promise<void>
Lifecycle method called when the plugin is started.
Returns
void | Promise<void>
onStop()?
optionalonStop():void|Promise<void>
Lifecycle method called when the plugin is stopped.
Returns
void | Promise<void>
setState()
setState(
state):void
Sets the lifecycle state of the plugin.
Parameters
state
The new lifecycle state of the plugin.
Returns
void
setStateError()
setStateError(
error):void
Sets the error state of the plugin.
Parameters
error
Error
The error that caused the plugin to enter the error state.
Returns
void