Revision history [back]

click to hide/show revision 1
initial version

answered 2022-05-03 15:49:42 +0800

hawk gravatar image hawk

http://hawkphoenix.blogsp... ZK Team

Auto-Unsubscribed only works when using SelectoComposer instead of a ViewModel. Please see Auto-Unsubscribed.

Since you call SelectorsExt.subscribeEventQueues(this); in a ViewModel, your @Subscribe still works and can receive events.

If you check ServerPushEventQueue.subscribe(), it add a listener EQCleanup that will remove the subscriber's listener when a desktop is destroyed:

_dtInfos.put(desktop, di = new DesktopInfo(desktop, new EQService(), new EQCleanup()));

So, you don't need to call postSubscriptionHandling().

Auto-Unsubscribed only works when using SelectoComposer by default instead of a ViewModel. Please see Auto-Unsubscribed.

Since you call SelectorsExt.subscribeEventQueues(this); in a ViewModel, your @Subscribe still works and can receive events.events from an event queue.

If you check ServerPushEventQueue.subscribe(), it add a listener EQCleanup that will remove the subscriber's listener when a desktop is destroyed:

_dtInfos.put(desktop, di = new DesktopInfo(desktop, new EQService(), new EQCleanup()));

So, you don't need to call postSubscriptionHandling().

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More