The ControllerInstance class represents an implementation of the Instance interface.
It provides the ability to define a controller that can include optional lifecycle methods.
The class may optionally include the onDestroy method, which is invoked to handle cleanup
or teardown logic when the instance is destroyed.
This design allows extending classes or implementations to define specific behaviors for
the onDestroy lifecycle hook.
Implements:
Instance: Interface to be implemented by the ControllerInstance class.
Methods:
onDestroy?: Optional. A method to define custom clean-up or shutdown logic when the
controller instance is destroyed. It is invoked automatically at the appropriate lifecycle stage.
Optional method to perform
teardown or clean-up actions specific to the instance. It is
invoked when the instance is being destroyed. This method does
not take any parameters and does not return any value.
The
ControllerInstance
class represents an implementation of theInstance
interface. It provides the ability to define a controller that can include optional lifecycle methods.The class may optionally include the
onDestroy
method, which is invoked to handle cleanup or teardown logic when the instance is destroyed.This design allows extending classes or implementations to define specific behaviors for the
onDestroy
lifecycle hook.Implements:
Instance
: Interface to be implemented by theControllerInstance
class.Methods:
onDestroy?
: Optional. A method to define custom clean-up or shutdown logic when the controller instance is destroyed. It is invoked automatically at the appropriate lifecycle stage.