public static interface ManagedSubscription.StatusListener
ManagedSubscription.| Modifier and Type | Method and Description |
|---|---|
default void |
onNotificationDataLost(ManagedSubscription subscription)
Notification data for this subscription was lost because attempts to call the Republish service failed.
|
default void |
onSubscriptionStatusChanged(ManagedSubscription subscription,
org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode statusCode)
A status change notification for
subscription was received. |
default void |
onSubscriptionTransferFailed(ManagedSubscription subscription,
org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode statusCode)
A subscription transfer has failed.
|
default void onNotificationDataLost(ManagedSubscription subscription)
Some action is required to ensure all the data items belonging to this subscription have a current value. The default implementation asynchronously invokes the the ResendData method on the server with this subscription's id as the argument.
subscription - the ManagedSubscription for which notification data was lost.default void onSubscriptionStatusChanged(ManagedSubscription subscription, org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode statusCode)
subscription was received.
Generally this happens in 2 scenarios:
statusCode
should be StatusCodes.Bad_Timeout. If data and event change notifications for items belonging to
this subscription are still desired then the subscription should be re-created.
statusCode should be
StatusCodes.Good_SubscriptionTransferred and no further action is necessary.
subscription - the ManagedSubscription for which a status change notification was received.statusCode - the StatusCode from the status change notification.default void onSubscriptionTransferFailed(ManagedSubscription subscription, org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode statusCode)
Upon reconnecting after a connection interruption an OpcUaClient will attempt to resume its previous
Session. If this fails a new Session is created and the Subscriptions from the previous Session are
transferred to the new one.
This callback is notified when the transfer to the new session has failed and indicates that the
subscription and all of its ManagedDataItems and ManagedEventItems will need to be created
again.
subscription - the ManagedSubscription for which transfer has failed.statusCode - the StatusCode for the transfer failure.Copyright © 2021. All rights reserved.