As a developer, I want to know when the notification service is disconnected and reconnected, in order to take appropriate actions (clear cache, ...).
With IG supporting transparent websocket notification disconnection, it now become important to be able to take action on disconnection or reconnection. For instance, if IG is dosconnected for some time, it may miss some token revocation notifications, therefore the session cache may contain entries that should be evicted. As IG don't know which entries should be removed (and because there is no way for IG to ask AM for missed notifications at this point), IG could decide, on reconnection that the whole cache content should be cleared.
- NotificationService offers a listener-kind of API where interested parties can register to be notified on disconnect/reconnect events
- Likely to be part of the Subscription interface: only make sense to add these listener when you actually have requested to be notified on websocket events
- Registration and un-registration of listeners is supported
- PolicyEnforcementFilter and SessionService (when cache is enabled) are likely to be first-class consumer of that API.