Subscribing to Method Results

The AgentManager also allows you to register a subscription for microagent methods with its subscribe() method. Registering for a subscription is analogous to registering for an event. It results in a continuous stream of MicroAgentData return values from the method being subscribed to. This data is asynchronously delivered to a SubscriptionHandler object supplied during registration.

In addition to a SubscriptionHandler, the subscribe() method of AgentManager requires a MicroAgentID, to identify the target, and a MethodSubscription object.