A SubscriptionManager represents a running Subscription on the Console.
The main reason we have SubscriptionManagers as TimerTasks is to enable proper cleanup of the references stored in the subscriptionByHandle and subscriptionById Maps. Ideally these will be cleaned up by a client calling cancelSubscription but we can't rely on that as the client may forget or the Agent may not respond.
The SubscriptionManager acts like a client/Console side representation of a Subscription running on an Agent. As mentioned above its primary purpose is to enable references to Subscriptions maintained by the Console to be cleaned up should the Subscription time out rather than being cancelled, however as a side effect it is used to enable emulation of Subscriptions to the broker ManagementAgent, which does not yet natively implement Subscription.
To emulate Subscriptions the Console receives the periodic _data indications pushed by the ManagementAgent. The Console then iterates through Subscriptions referencing the broker Agent and evaluates their queries against the QmfConsoleData returned by the _data indication. Any QmfConsoleData that match the query are passed to the client application with the consoleHandle of the matching Subscription.
The following diagram illustrates the Subscription relationships with the Console and local Agent proxy.
@author Fraser Adams