Linked apps
Add the option LINKED to start() to the client APIs.
This implies:
- When the app is terminated, the stop request is sent to each linked app (not kill).
A new function is added to the API: connectLinkedApps() : list of Instance So that a special stop can be made on the linked apps with the stop handler.
The link mechanism can be implemented:
- App sa: the starter
- App la: the linked app
- Server of the starter: ss
- Server of the linked app: ls
Solution:
- The linked attribute is passed to ls.
- An event thread listening to ls is started in ss if it is not already started.
- The event thread must be synchronized.
- When ls receives notification of a terminal state for sa, then la is stopped.
- The event thread has a timeout: when there is no activity on a linked app, the thread terminates.