Subscribe to hear when a mock session is stopped. The listener is provided with the state of all plugins that are about to be stopped. This can be used to log mock session shutdown, add side-effects that run elsewhere at shutdown, or clean up after sessions in other ways.
This is run synchronously immediately before the session is shutdown, whilst all
its state is still available, and before remote clients have had any response to
their request. This is also run before shutdown when the admin server itself is
cleanly shutdown with adminServer.stop()
.
Subscribe to hear when each mock ession is started. The listener is provided the session plugin data, which can be used to log session startup, add side-effects that run elsewhere at startup, or preconfigure every started plugin in addition ways.
This is run synchronously when a session is created, after it has fully started but before its been returned to remote clients.