|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.client.SubscriptionAliveAdapter
public class SubscriptionAliveAdapter
A default, empty implementation of the SubscriptionAliveListener. You can use the adapter to enable more flexible implementation of the interface in your applications. Instead of implementing all methods of the interface, you can just override the methods that you wish to react to.
| Constructor Summary | |
|---|---|
SubscriptionAliveAdapter()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubscriptionAliveAdapter()
| Method Detail |
|---|
public void onAfterCreate(Subscription subscription)
SubscriptionAliveListenerIf 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.
onAfterCreate in interface SubscriptionAliveListenersubscription - the subscription that was createdpublic void onAlive(Subscription subscription)
SubscriptionAliveListener
onAlive in interface SubscriptionAliveListenersubscription - the subscription that got the alive messagepublic void onTimeout(Subscription subscription)
SubscriptionAliveListenerYou 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 SubscriptionAliveListener.onAfterCreate(Subscription).
onTimeout in interface SubscriptionAliveListenersubscription - the subscription that timed out
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||