public interface AsyncMethodHandler
Modifier and Type | Method and Description |
---|---|
void |
startAsyncMethodSubscription(MethodSubscription msub,
AsyncDataHandler h)
Used to start a subscription for an async method.
|
void |
stopAsyncMethodSubscription(MethodSubscription msub)
Used to stop a subscription for an async method.
|
void startAsyncMethodSubscription(MethodSubscription msub, AsyncDataHandler h) throws MicroAgentException
When invoked, microagents implementing this interface should begin asynchronous delivery of the subscribed-to data through the supplied AsyncDataHandler.
This method will be called only once for each unique subscription (defined by the MethodSubscription arguemnt) and may not be invoked again for that same subscription until after the corresponding stopAsyncMethodSubscription() method has been called for this subscription. The supplied AsyncDataHandler
There are two general types of errors that can occur with method subscriptions:
msub
- Identifies what is being subscribed to.h
- The object that handles the subscribed to data and errors that occur
after successful registration.MicroAgentException
- If an error occurs during the initialization of the subscription.void stopAsyncMethodSubscription(MethodSubscription msub) throws MicroAgentException
When invoked, microagents implementing this interface should stop servicing the identified subscription and discard the AsyncDataHandler supplied in the corresponding startAsyncMethodSubscription() call identified by the same MethodSubscription.
msub
- Identifies what is being subscribed to.h
- The object that handles the subscribed to data and errors that occur
after successful registration.MicroAgentException
- If an error occurs during the termination of the subscription.Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.