A behaviour module for implementing a supervisor_bridge, a process which connects a subsystem not designed according to the OTP design principles to a supervision tree. The supervisor_bridge sits between a supervisor and the subsystem. It behaves like a real supervisor to its own supervisor, but has a different interface than a real supervisor to the subsystem. Refer to OTP Design Principles for more information.
A supervisor_bridge assumes the functions for starting and stopping the subsystem to be located in a callback module exporting a pre-defined set of functions.
The
Unless otherwise stated, all functions in this module will fail if the specified supervisor_bridge does not exist or if bad arguments are given.
Creates a supervisor_bridge process, linked to the calling
process, which calls
If
If the supervisor_bridge and the subsystem are successfully
started the function returns
If
The following functions should be exported from a
Whenever a supervisor_bridge is started using
The function should return
If later
If something goes wrong during the initialization the function
should return
This function is called by the supervisor_bridge when it is about
to terminate. It should be the opposite of