public interface SubscriptionHandler
MicroAgentServer.subscribe()
They handle the subscription results.
Each of the methods in this interface behaves as a message callback function, processing each message as it arrives.
As with all asynchronous callback functions, your implementations of these methods must return promptly, and must not block. If any of these methods must compute at length, we recommend that it spawn a separate thread to complete its task.
If any of these methods accesses shared data, you must protect against access collision by synchronizing.
Modifier and Type | Method and Description |
---|---|
void |
onData(Subscription s,
MicroAgentData data)
This method receives the data for a particular
subscription.
|
void |
onError(Subscription s,
MicroAgentException e)
This method is called when an error causes an interruption in the
servicing of a subscription.
|
void |
onErrorCleared(Subscription s)
This method is called when there no longer is an error condition
which is interrupting service.
|
void |
onTermination(Subscription s,
MicroAgentException e)
This method is called when an error condition causes the subscription
to be terminated.
|
void onData(Subscription s, MicroAgentData data)
s
- The Subscription object generated when the subscription was made.data
- The data produced by the MicroAgent.void onError(Subscription s, MicroAgentException e)
s
- The Subscription object generated when the subscription was made.e
- An exception identifying the errorvoid onErrorCleared(Subscription s)
s
- The Subscription object generated when the subscription was made.void onTermination(Subscription s, MicroAgentException e)
s
- The Subscription object generated when the subscription was made.e
- An exception identifying the error condition that caused the terminationCopyright © 2000-2019 TIBCO Inc. All Rights Reserved.