|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SubscriptionManagerListener
A listener interface to listen to subscription changes made to the SubscriptionManager.
| Method Summary | |
|---|---|
void |
onAddSubscription(ServiceContext serviceContext,
Subscription subscription)
Notification of a new subscription. |
void |
onAfterCreateMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
Notification of monitored item creation |
void |
onAfterDeleteMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
Notification that a monitored item was deleted. |
void |
onAfterModifyMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
Notification after a MonitoredItem was modified. |
void |
onCreateMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.utils.NumericRange indexRange,
org.opcfoundation.ua.core.MonitoringParameters params,
org.opcfoundation.ua.core.MonitoringFilter filter,
org.opcfoundation.ua.core.AggregateFilterResult filterResult,
org.opcfoundation.ua.core.MonitoringMode monitoringMode)
Notification of a new MonitoredDataItem request from a client application. |
void |
onCreateMonitoredEventItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.EventFilter eventFilter,
org.opcfoundation.ua.core.EventFilterResult filterResult)
Notification of a new MonitoredEventItem request from a client application. |
void |
onDeleteMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
Notification of monitored item deletion request. |
void |
onModifyMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item,
org.opcfoundation.ua.core.MonitoringParameters params,
org.opcfoundation.ua.core.MonitoringFilter filter,
org.opcfoundation.ua.core.MonitoringFilterResult filterResult)
Notification of monitored event item modification request. |
void |
onModifyMonitoredEventItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredEventItem item,
org.opcfoundation.ua.core.EventFilter filter,
org.opcfoundation.ua.core.EventFilterResult filterResult)
Notification of monitored event item modification request. |
void |
onModifySubscription(ServiceContext serviceContext,
Subscription subscription)
Notification of a Subscription modification. |
void |
onRemoveSubscription(ServiceContext serviceContext,
Subscription subscription)
Notification of Subscription removal. |
| Method Detail |
|---|
void onAddSubscription(ServiceContext serviceContext,
Subscription subscription)
throws ServiceException
If you wish to deny the subscription, you may throw a ServiceException
serviceContext - the client calling context.subscription - the subscription that was added
ServiceException
void onAfterCreateMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
serviceContext - the client calling context.subscription - the subscription where the monitored item was createditem - the item that was created. This can be either a MonitoredDataItem or
MonitoredEventItem.
void onAfterDeleteMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
serviceContext - the client calling context.subscription - the subscription from where the monitored item was deleteditem - the item that was deleted. This can be either a MonitoredDataItem or
MonitoredEventItem.
void onAfterModifyMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
The method is called whenever the item parameters, filter or the monitoring mode is changed.
The parameter and filter changes are also notified in
onModifyMonitoredDataItem(ServiceContext, Subscription, MonitoredDataItem, MonitoringParameters, MonitoringFilter, MonitoringFilterResult)
or
onModifyMonitoredEventItem(ServiceContext, Subscription, MonitoredEventItem, EventFilter, EventFilterResult)
where you can verify them. Monitoring mode is only notified here after it has been changed.
serviceContext - the client calling context.subscription - the subscriptionitem - the item that was modified. This can be either a MonitoredDataItem or
MonitoredEventItem.
void onCreateMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.utils.NumericRange indexRange,
org.opcfoundation.ua.core.MonitoringParameters params,
org.opcfoundation.ua.core.MonitoringFilter filter,
org.opcfoundation.ua.core.AggregateFilterResult filterResult,
org.opcfoundation.ua.core.MonitoringMode monitoringMode)
throws StatusException
Note that the event items are being notified by the EventManager.
serviceContext - the client calling context.subscription - the subscription to which the item is being addednode - The node to monitor.attributeId - The attribute to monitor.indexRange - A possible index range for array values.params - The requested monitoring parameters.filter - an optional filter for the item. This may be a DataChangeFilter or
AggregateFilterfilterResult - the results for an AggregateFilterResult. Fill the object with your
results, if there are problems in using the defined filter. For DataChangeFilters the
parameter is not used (and will be null).monitoringMode - The requested MonitoringMode for the item being added.
StatusException - if the item cannot or may not be created.
void onCreateMonitoredEventItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.EventFilter eventFilter,
org.opcfoundation.ua.core.EventFilterResult filterResult)
throws StatusException
serviceContext - the client calling context.nodeId - the node that will be monitoredeventFilter - the event filter, which defines the nodes and events to monitoreventFilterResult - the filter results to fill in, if there is something to note about the
requested filter. This is defined as OK by default.
StatusException - if the item cannot or may not be created.
void onDeleteMonitoredItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredItem item)
throws StatusException
serviceContext - the client calling context.subscription - the subscription from where the monitored item was deleteditem - the item that is to be removed
StatusException - if you wish to cancel the removal for some reason.
void onModifyMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item,
org.opcfoundation.ua.core.MonitoringParameters params,
org.opcfoundation.ua.core.MonitoringFilter filter,
org.opcfoundation.ua.core.MonitoringFilterResult filterResult)
throws StatusException
serviceContext - the client calling context.subscription - the subscription containing the modified monitored itemitem - the item being modifiedparams - the parameters to change for the itemfilter - the new MonitoringFilter. This may be either a DataChangeFilter or
AggregateFilter or null if not changedfilterResult - the results for the filter, if it is an AggregateFilter.
StatusException - if you wish to cancel the modification for some reason.
void onModifyMonitoredEventItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredEventItem item,
org.opcfoundation.ua.core.EventFilter filter,
org.opcfoundation.ua.core.EventFilterResult filterResult)
throws StatusException
serviceContext - the client calling context.subscription - the subscription containing the modified monitored itemitem - the item being modifiedfilter - the change to the itemfilterResult - the results for the filter. the parameter is filled by the EventManager
which parses the filter for the item
StatusException - if you wish to cancel the modification for some reason.
void onModifySubscription(ServiceContext serviceContext,
Subscription subscription)
The method is called whenever the subscription parameters are changed. The requested parameters have already been verified by the SubscriptionManager and changed to the Subscription when the method is called. You may revise the values directly in the Subscription, if necessary.
The modified parameters are SubscriptionBase.getPublishingInterval(),
SubscriptionBase.getMaxKeepAliveCount(), SubscriptionBase.getLifetimeCount(),
Subscription.getMaxNotificationsPerPublish() & SubscriptionBase.getPriority().
serviceContext - the client calling context.subscription - the subscription
void onRemoveSubscription(ServiceContext serviceContext,
Subscription subscription)
throws ServiceException
If the subscription timeouts, it is also removed. subscription.hasExpired() = true in this case.
serviceContext - the client calling context. Note that this can also be
ServiceContext.INTERNAL_OPERATION_CONTEXT in case the subscription is being removed when
the client is closing the session (and keepSubscriptions is set to false, to request a
removal of all subscriptions) or it timeouts.subscription - the subscription to remove
ServiceException - if you wish to cancel the removal for some reason. Do not cancel if
'serviceContext == ServiceContext.INTERNAL_OPERATION_CONTEXT'
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||