|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NodeManagerListener
Event listener interface to handle calls to the node manager.
| Method Summary | |
|---|---|
void |
onAddNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId parentNodeId,
UaNode parent,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.core.NodeAttributes attributes,
UaReferenceType referenceType,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId,
UaNode typeDefinition)
A notification of an AddNode request to add a new node into the node manager. |
void |
onAddReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
UaNode sourceNode,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
UaReferenceType referenceType,
boolean isForward)
A notification of an AddReference request to add a new reference into the node manager. |
void |
onAfterAddNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId parentNodeId,
UaNode parent,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.core.NodeAttributes attributes,
UaReferenceType referenceType,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId,
UaNode typeDefinition)
Called after a node is added as a result of an AddNodes call. |
void |
onAfterAddReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
UaNode sourceNode,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
UaReferenceType referenceType,
boolean isForward)
Called after a reference is added as a result of an AddReferences call. |
void |
onAfterCreateMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
Notification after a new MonitoredDataItem was added to a subscription. |
void |
onAfterDeleteMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
Notification after a MonitoredDataItem was deleted. |
void |
onAfterModifyMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
Notification after a MonitoredDataItem was modified. |
boolean |
onBrowseNode(ServiceContext serviceContext,
org.opcfoundation.ua.core.ViewDescription view,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
UaReference reference)
Handle a browse request. |
void |
onCreateMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
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 |
onDeleteMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
Notification of a data item being removed from a client subscription. |
void |
onDeleteNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
boolean deleteTargetReferences)
Confirm a request to delete a node permanently from the address space of the node manager. |
void |
onDeleteReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
UaNode sourceNode,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
UaReferenceType referenceType,
boolean isForward,
boolean deleteBidirectional)
Confirm a request to delete a reference permanently from the address space of the node manager. |
void |
onGetReferences(ServiceContext serviceContext,
org.opcfoundation.ua.core.ViewDescription viewDescription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
List<UaReference> references)
Provide the references for a node in the browse request. |
void |
onModifyMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item,
UaNode node,
org.opcfoundation.ua.core.MonitoringParameters params,
org.opcfoundation.ua.core.MonitoringFilter filter,
org.opcfoundation.ua.core.AggregateFilterResult filterResult)
Notification of a modify request on the monitoring parameters of a monitored item. |
| Method Detail |
|---|
void onAfterAddNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId parentNodeId,
UaNode parent,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.core.NodeAttributes attributes,
UaReferenceType referenceType,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId,
UaNode typeDefinition)
throws StatusException
onAddNode(ServiceContext, NodeId, UaNode, NodeId, NodeClass, QualifiedName, NodeAttributes, UaReferenceType, ExpandedNodeId, UaNode)
instead of this method.
serviceContext - The client calling context. serviceContext.isInternal() is true if the
request is coming from a server internal operation.parentNodeId - NodeId of the parent nodeparent - Parent node if availablenodeId - Requested ID for the new nodenode - The added node (if TypeDefinition has subnodes, they are added as a reference to
this node, i.e. this node is the top node)nodeClass - NodeClass of the new node to addbrowseName - BrowseName of the new nodeattributes - Other attribute values of the new nodereferenceType - Reference used to add the node to parenttypeDefinitionId - Type Definition ID of the new nodetypeDefinition - TypeDefinition node if available
StatusException
void onAfterAddReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
UaNode sourceNode,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
UaReferenceType referenceType,
boolean isForward)
throws StatusException
onAddReference(ServiceContext, NodeId, UaNode, ExpandedNodeId, UaNode, NodeId, UaReferenceType, boolean)
instead.
serviceContext - The client calling context. serviceContext.isInternal() is true if the
request is coming from a server internal operation.sourceNodeId - The NodeId of the source nodesourceNode - The source node of the reference, if available as a UaNodetargetNodeId - The NodeId of the target nodetargetNode - The target node of the reference, if available as a UaNodereferenceTypeId - The NodeId of the type of reference to addreferenceType - The type of reference to add as an UaReferenceType nodeisForward - Whether to add a forward reference - if false, add an inverse reference, i.e.
from target to source
StatusException
void onAfterCreateMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
serviceContext - The client calling context.subscription - The subscriptionitem - The item that was added
void onAfterDeleteMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
serviceContext - The client calling context.subscription - The subscriptionitem - The item that was modified
void onAfterModifyMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
The method is called whenever the item parameters or filter is changed or if the MonitoringMode
is changed. The parameter and filter changes are also notified in
onModifyMonitoredDataItem(ServiceContext, Subscription, MonitoredDataItem, UaNode, MonitoringParameters, MonitoringFilter, AggregateFilterResult)
where you can validate them. MonitoringMode is only notified here after it has been changed.
serviceContext - The client calling context.subscription - The subscriptionitem - The item that was modified
void onAddNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId parentNodeId,
UaNode parent,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.core.NodeAttributes attributes,
UaReferenceType referenceType,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId,
UaNode typeDefinition)
throws StatusException
You should use the method to check if the user has rights to add the node to the server. If not, throw StatusException with StatusCode=Bad_UserAccessDenied.
serviceContext - The client calling context. serviceContext.isInternal() is true if the
request is coming from a server internal operation.parentNodeId - NodeId of the parent nodeparent - Parent node if availablenodeId - Requested ID for the new nodenodeClass - NodeClass of the new node to addbrowseName - BrowseName of the new nodeattributes - Other attribute values of the new nodereferenceType - Reference used to add the node to parenttypeDefinitionId - Type Definition ID of the new nodetypeDefinition - TypeDefinition node if available
StatusException - with StatusCode=Bad_UserAccessDenied, if the user is not allowed to
perform the operation
void onAddReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
UaNode sourceNode,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
UaReferenceType referenceType,
boolean isForward)
throws StatusException
You should use the method to check if the user has rights to add the reference to the server. If not, throw StatusException with StatusCode=Bad_UserAccessDenied.
serviceContext - The client calling context. serviceContext.isInternal() is true if the
request is coming from a server internal operation.sourceNodeId - The NodeId of the source nodesourceNode - The source node of the reference, if available as a UaNodetargetNodeId - The NodeId of the target nodetargetNode - The target node of the reference, if available as a UaNodereferenceTypeId - The NodeId of the type of reference to addreferenceType - The type of reference to add as an UaReferenceType nodeisForward - Whether to add a forward reference - if false, add an inverse reference, i.e.
from target to source
StatusException - with StatusCode=Bad_UserAccessDenied, if the user is not allowed to
perform the operation
boolean onBrowseNode(ServiceContext serviceContext,
org.opcfoundation.ua.core.ViewDescription view,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
UaReference reference)
serviceContext - The client calling contextview - The view being browsednodeId - The ID of the node being browsednode - The node being browsedreference - The reference about to be included in the browse results
onGetReferences(com.prosysopc.ua.server.ServiceContext, org.opcfoundation.ua.core.ViewDescription, org.opcfoundation.ua.builtintypes.NodeId, com.prosysopc.ua.nodes.UaNode, java.util.List)
void onCreateMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
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 addednodeId - The NodeId for the node to monitornode - The node to monitor. Can be null if listening a NodeManager that does not support
UaNodes.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
AggregateFilterResultfilterResult - 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 - with StatusCode=Bad_UserAccessDenied, if the user is not allowed to
perform the operation
void onDeleteMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item)
serviceContext - The client calling context.subscription - The subscription from which the item is being removeditem - The monitored item to remove
void onDeleteNode(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
boolean deleteTargetReferences)
throws StatusException
serviceContext - The client calling context.nodeId - The ID of the node to deletenode - The node being deleted, if availabledeleteTargetReferences - Whether the references in which this node is the target, should
also be deleted.
StatusException - If the reference may not be deleted, with a specific status code. Use
either one of these: Bad_UserAccessDenied, Bad_NoDeleteRights
void onDeleteReference(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId sourceNodeId,
UaNode sourceNode,
org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
UaReferenceType referenceType,
boolean isForward,
boolean deleteBidirectional)
throws StatusException
serviceContext - The client calling context.sourceNodeId - The NodeId of the source nodesourceNode - The source node of the reference, if available as a UaNodetargetNodeId - The NodeId of the target nodetargetNode - The target node of the reference, if available as a UaNodereferenceTypeId - The NodeId of the type of reference to removereferenceType - The type of reference to remove as an UaReferenceType nodeisForward - Whether to remove a forward reference - if false, delete the inverse
reference, i.e. from target to sourcedeleteBidirectional - Whether to remove a reference to both directions
StatusException - If the reference may not be deleted, with a specific status code. Use
either one of these: Bad_UserAccessDenied, Bad_NoDeleteRights
void onGetReferences(ServiceContext serviceContext,
org.opcfoundation.ua.core.ViewDescription viewDescription,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
UaNode node,
List<UaReference> references)
serviceContext - The client calling context.viewDescription - The view being browsednodeId - The node id of the node that is browsednode - The node that is browsedreferences - The initial references of the node. Modify the list as required, for example
to add custom references to the list. The list may get filtered later in
onBrowseNode(com.prosysopc.ua.server.ServiceContext, org.opcfoundation.ua.core.ViewDescription, org.opcfoundation.ua.builtintypes.NodeId, com.prosysopc.ua.nodes.UaNode, com.prosysopc.ua.nodes.UaReference).
void onModifyMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
MonitoredDataItem item,
UaNode node,
org.opcfoundation.ua.core.MonitoringParameters params,
org.opcfoundation.ua.core.MonitoringFilter filter,
org.opcfoundation.ua.core.AggregateFilterResult filterResult)
throws StatusException
serviceContext - The client calling context.subscription - The subscription to which the item is being addeditem - The monitoring item to modifynode - The node being monitored (as given by getNode(item.getNodeId())).params - The requested monitoring parameters.filter - An optional filter. This may be a DataChangeFilter of 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).
StatusException - with StatusCode=Bad_UserAccessDenied, if the user is not allowed to
perform the operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||