|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SubscriptionAliveListener
An event listener for subscription alive and timeout notifications. These are sent from the subscription whenever it receives a publish response without any notification data (an alive message) or when it timeouts receiving one (i.e. when the server has not sent any response message even though the maximum KeepAlive time has elapsed.)
SubscriptionAliveAdapter,
SubscriptionNotificationListener| Method Summary | |
|---|---|
void |
onAfterCreate(Subscription subscription)
Notifies that the subscription was created into the server. |
void |
onAlive(Subscription subscription)
Notifies that the server sent an alive message, even though it does not have any notification data. |
void |
onTimeout(Subscription subscription)
Notifies that a timeout has occurred for a subscription. |
| Method Detail |
|---|
void onAfterCreate(Subscription subscription)
If you connect the listener before the subscription is created initially into the server, you will get the notification of the initial creation.
The method is called also, when the client is reconnected after a communication break and the subscription could not be reused, but had to be recreated. In this case, it is possible that some notifications were missed by the client and it may need to perform a history read if it needs the event or data notifications that were sent during the communication break.
subscription - the subscription that was createdvoid onAlive(Subscription subscription)
subscription - the subscription that got the alive messagevoid onTimeout(Subscription subscription)
You can read the LastAlive time of the subscription to decide whether you want to still wait for a late response.
Even if the client determines that the subscription has timed out, the server may still have it
alive. UaClient will automatically reuse the subscription as long as it is available and will
recreate it when not. Recreation is notified by onAfterCreate(Subscription).
subscription - the subscription that timed out
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||