Class: WebSocketPlugin
A plugin for handling WebSockets.
Extends
Constructors
Constructor
new WebSocketPlugin(
logger,injector):WebSocketPlugin
Parameters
logger
injector
Returns
WebSocketPlugin
Overrides
Properties
options
protectedoptions:WebSocketPluginOptions
Overrides
state
protectedstate:PluginLifecycle
Inherited from
stateError?
protectedoptionalstateError?:Error
Inherited from
dependencies
readonlystaticdependencies:object[]
optional
optional:
boolean=true
plugin
plugin: typeof
HttpPlugin=HttpPlugin
Overrides
Methods
getState()
getState():
PluginLifecycle
Retrieves the current lifecycle state of the plugin.
Returns
The current lifecycle state of the plugin.
Inherited from
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.
Inherited from
onRegister()
onRegister(
context,options?):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
Promise<void>
Overrides
onStart()
onStart():
Promise<void>
Lifecycle method called when the plugin is started.
Returns
Promise<void>
Overrides
onStop()
onStop():
Promise<void>
Lifecycle method called when the plugin is stopped.
Returns
Promise<void>
Overrides
setState()
setState(
state):void
Sets the lifecycle state of the plugin.
Parameters
state
The new lifecycle state of the plugin.
Returns
void
Inherited from
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