public class NodeManagerUaNode extends NodeManager
addNode(UaNode) or addNodeAndReference(UaNode, UaNode, NodeId) to add your
node objects into the NodeManager. You can add references to the nodes using
addReference(com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.ExpandedNodeId, com.prosysopc.ua.stack.builtintypes.NodeId, boolean).initialized, started| Constructor and Description |
|---|
NodeManagerUaNode(UaServer server,
String namespaceUri)
The default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(UaNode parent,
UaInstance component)
Add a node as a component of another node into the address space.
|
protected NodeId |
addNode(ServiceContext serviceContext,
NodeId nodeId,
NodeId parentNodeId,
QualifiedName browseName,
NodeClass nodeClass,
ExpandedNodeId typeDefinitionId,
NodeAttributes attributes,
NodeId referenceTypeId)
Handle adding a new node.
|
UaNode |
addNode(UaNode newNode)
Adds a new node - unless it already exists in the node manager.
|
UaNode |
addNodeAndReference(UaNode parent,
UaNode newNode,
NodeId referenceTypeId) |
void |
addReference(NodeId sourceId,
ExpandedNodeId targetId,
NodeId referenceTypeId,
boolean isInverse)
Adds a Reference.
|
void |
addReference(NodeId sourceId,
NodeId targetId,
NodeId referenceTypeId,
boolean isInverse)
Adds a reference to the Node Manager, if both the source and target are found.
|
protected void |
addReference(ServiceContext serviceContext,
NodeId sourceNodeId,
ExpandedNodeId targetNodeId,
NodeId referenceTypeId,
boolean isForward,
NodeClass targetNodeClass,
String targetServerUri)
Handle adding a reference.
|
void |
addReference(UaNode sourceNode,
UaNode targetNode,
NodeId referenceTypeId,
boolean isInverse)
Add a new reference between the source and target node.
|
<T extends UaType> |
addType(ExpandedNodeId newTypeDefinitionId,
String name,
T baseType) |
<T extends UaType> |
addType(NodeId nodeId,
String name,
T baseType)
Add a new Object type Node to the Node Manager.
|
protected void |
close()
Close the node manager, when the serve closes.
|
<T extends BaseEventType> |
createEvent(Class<T> clazz)
Creates a new event instance to be triggered.
|
<T extends BaseEventType> |
createEvent(Class<T> clazz,
UaNodeBuilderConfiguration configuration)
Creates a new event instance to be triggered.
|
<T extends BaseEventType> |
createEvent(ExpandedNodeId eventTypeId)
Creates a new event instance to be triggered.
|
<T extends BaseEventType> |
createEvent(ExpandedNodeId eventTypeId,
UaNodeBuilderConfiguration configuration)
Creates a new event instance to be triggered.
|
<T extends BaseEventType> |
createEvent(NodeId eventTypeId)
Creates a new event instance to be triggered.
|
<T extends BaseEventType> |
createEvent(NodeId eventTypeId,
UaNodeBuilderConfiguration configuration)
Creates a new event instance to be triggered.
|
FolderType |
createFolder(String name,
NodeId newNodeId)
Convenience method for creating a FolderType UaObject.
|
<T extends UaInstance> |
createInstance(Class<T> clazz,
NodeId newNodeId,
QualifiedName browseName,
LocalizedText displayName)
Creates new UA instance.
|
<T extends UaInstance> |
createInstance(Class<T> clazz,
String name)
Creates new UA instance.
|
<T extends UaInstance> |
createInstance(Class<T> clazz,
String name,
NodeId newNodeId)
Creates new UA instance.
|
UaInstance |
createInstance(ExpandedNodeId typeId,
NodeId newNodeId,
QualifiedName browseName,
LocalizedText displayName)
Creates new UA instance.
|
UaInstance |
createInstance(ExpandedNodeId typeId,
String name)
Creates new UA instance.
|
UaInstance |
createInstance(ExpandedNodeId typeId,
String name,
NodeId newNodeId)
Creates new UA instance.
|
UaInstance |
createInstance(NodeId typeId,
NodeId newNodeId,
QualifiedName browseName,
LocalizedText displayName)
Creates new UA instance.
|
UaInstance |
createInstance(NodeId typeDefinitionId,
String name)
Creates new UA instance.
|
UaInstance |
createInstance(NodeId typeDefinitionId,
String name,
NodeId newNodeId)
Creates new UA instance.
|
protected void |
createMonitoredDataItem(ServiceContext serviceContext,
Subscription subscription,
NodeId nodeId,
UnsignedInteger attributeId,
NumericRange indexRange,
MonitoringParameters params,
MonitoringFilter filter,
AggregateFilterResult filterResult,
MonitoringMode monitoringMode)
Check that the monitored item request is valid.
|
<T extends UaInstance> |
createNodeBuilder(Class<T> clazz)
Creates a NodeBuilder for given type.
|
<T extends UaInstance> |
createNodeBuilder(Class<T> clazz,
UaNodeBuilderConfiguration configuration)
Creates a NodeBuilder for given type.
|
<T extends UaInstance> |
createNodeBuilder(ExpandedNodeId typeDefinitionId)
Creates a NodeBuilder for given type.
|
<T extends UaInstance> |
createNodeBuilder(ExpandedNodeId typeId,
UaNodeBuilderConfiguration configuration)
Creates a NodeBuilder for given type.
|
<T extends UaInstance> |
createNodeBuilder(NodeId typeDefinitionId)
Creates a NodeBuilder for given type.
|
<T extends UaInstance> |
createNodeBuilder(NodeId typeId,
UaNodeBuilderConfiguration configuration)
Creates a NodeBuilder for given type.
|
protected UaNode |
createNodeForAddNodesRequest(NodeId nodeId,
QualifiedName browseName,
NodeClass nodeClass,
ExpandedNodeId typeDefinitionId,
LocalizedText displayName)
Create node(s) for a single AddNodesRequest.
|
protected UaNode |
createNodeForNodeSet2(NodeId nodeId,
QualifiedName browseName,
NodeClass nodeClass,
ExpandedNodeId typeDefinitionId,
LocalizedText displayName)
Create a node for ModelParser loading NodeSet2.
|
NodeId |
createNodeId(UaNode parent,
QualifiedName name)
Convenience method for createNodeId(UaNode, QualifiedName, int) that uses this NodeManager's
NamespaceIndex.
|
NodeId |
createNodeId(UaNode parent,
QualifiedName name,
int namespaceIndex)
Creates a new string type NodeId as
|
NodeId |
createNodeId(UaNode parent,
String name)
Create a new string type NodeId as "
|
NodeId |
createNodeId(UaNode parent,
String name,
int namespaceIndex)
Create a new string type NodeId as "[ParentNodeId].[Name]", where ParentNodeId is the Node Id
of the parent converted to string.
|
protected NodeMap |
createNodeMap() |
UaNode |
deleteNode(NodeId nodeId,
boolean deleteTargetReferences,
boolean deleteChildren)
Delete a node from the node manager.
|
protected void |
deleteNode(ServiceContext serviceContext,
NodeId nodeId,
Boolean deleteTargetReferences) |
UaNode |
deleteNode(UaNode node,
boolean deleteTargetReferences,
boolean deleteChildren)
Delete a node from the node manager.
|
protected UaNode |
deleteNode(UaNode node,
boolean deleteTargetReferences,
boolean deleteChildren,
boolean doNotDeleteIfInverseHierarchicalRefs) |
void |
deleteReference(NodeId sourceNodeId,
ExpandedNodeId targetNodeId,
NodeId referenceTypeId)
Delete a reference between the source and target node.
|
protected void |
deleteReference(ServiceContext serviceContext,
NodeId sourceNodeId,
ExpandedNodeId targetNodeId,
NodeId referenceTypeId,
Boolean isForward,
Boolean deleteBidirectional) |
void |
deleteReference(UaNode sourceNode,
ExpandedNodeId targetNodeId,
NodeId referenceTypeId)
Delete a reference between the source and target node.
|
void |
deleteReference(UaNode sourceNode,
UaNode targetNode,
NodeId referenceTypeId)
Delete a reference between the source and target node.
|
UaNode |
findNode(NodeId nodeId)
Find the UaNode corresponding to the nodeId, if the Node Manager
NodeManager.supportsUaNode(). |
protected QualifiedName |
getBrowseName(ExpandedNodeId nodeId,
UaNode node)
Get the BrowseName of a node.
|
UaDataType |
getDataType(NodeId dataTypeId)
Get a matching
UaDataType node for the id. |
protected LocalizedText |
getDisplayName(ExpandedNodeId nodeId,
UaNode node,
Locale locale)
Find the DisplayName of a node.
|
IoManagerUaNode |
getIoManager() |
protected UaNode |
getNode(ExpandedNodeId nodeId,
UnsignedInteger errorCode)
Get the node or return a specific error.
|
protected UaNode |
getNode(NodeId nodeId,
UnsignedInteger errorCode)
Get the node or return a specific error.
|
UaNodeBuilderConfiguration |
getNodeBuilderConfiguration()
Get the
NodeBuilder configuration that this manager uses. |
protected NodeClass |
getNodeClass(NodeId nodeId,
UaNode node)
Return the node class of a node, owned by this NodeManager.
|
UaNodeFactory |
getNodeFactory() |
char |
getNodeIdDelimiter() |
String |
getNodeIdFormat()
The current format for new nodeIds created for internal nodes of UA objects, such as the
ConditionType objects.
|
UaNode |
getNodeOrExternal(NodeId nodeId)
Mostly for internal use.
|
UaNode |
getNodeOrExternalIfExist(NodeId nodeId)
Mostly for internal use.
|
NodeMap |
getNodes() |
protected UaReference[] |
getReferences(NodeId nodeId,
UaNode node)
Get all references of a node.
|
UaType |
getType(NodeId typeId)
Find the type node with a specific Id
|
protected ExpandedNodeId |
getTypeDefinition(ExpandedNodeId nodeId,
UaNode node)
Get the TypeDefinition of a node.
|
NodeId |
getVariableDataType(NodeId nodeId,
UaValueNode variable)
Get the data type of a variable node, managed by this node manager.
|
boolean |
hasNode(NodeId nodeId)
Check if the node manager has a certain node.
|
protected void |
replaceExternalNode(UaExternalNode oldNode,
UaNode newNode) |
protected boolean |
requireUaNode() |
void |
setNodeBuilderConfiguration(UaNodeBuilderConfiguration nodeBuilderConfiguration)
Override the
NodeBuilder configuration for this manager. |
void |
setNodeFactory(UaNodeFactory nodeFactory)
Define the NodeFactory to use for creating new nodes.
|
void |
setNodeIdDelimiter(char nodeIdDelimiter) |
boolean |
supportsUaNode()
Whether the NodeManager supports UaNode instances.
|
UaNodeSet |
toNodeSet()
Creates
UaNodeSet from the nodes of this NodeManagerUaNode. |
addListener, afterCreateMonitoredDataItem, afterCreateMonitoredEventItem, afterDeleteMonitoredItem, afterModifyMonitoredDataItem, afterModifyMonitoredEventItem, browseNode, callMethod, createMonitoredEventItem, createReferenceDescription, deleteMonitoredItem, findNode, findNodeClass, fireAddNode, fireAddReference, fireAfterAddNode, fireAfterAddReference, fireAfterCreateMonitoredDataItem, fireAfterDeleteMonitoredItem, fireAfterModifyMonitoredDataItem, fireBrowseNode, fireCreateMonitoredDataItem, fireDeleteMonitoredItem, fireDeleteNode, fireDeleteReference, fireModifyMonitoredDataItem, getDefaultLocale, getEventManager, getEventManager, getHistoryManager, getIsOfType, getMethodManager, getNamespaceIndex, getNamespaceTable, getNamespaceUri, getNode, getNode, getNodeClass, getNodeId, getQualifiedName, getReferences, getReferenceType, hasListener, init, invalidatePreviousNodeCache, isInitialized, isOfType, isStarted, modifyMonitoredDataItem, modifyMonitoredEventItem, queryFirst, queryNext, referenceMatchesRequest, registerNode, removeListener, setDefaultLocale, setEventManager, setHistoryManager, setIoManager, setMethodManager, start, toString, translateBrowsePath, unregisterNodearrayDimensionsMatch, checkIsMethod, checkIsValueNode, checkIsVariable, checkIsVariableOrVariableType, dataTypeEquals, getNode, getNode, getNodeManagerTable, getServer, getSubscriptionManager, isValueNode, isVariable, listenerErrorpublic void addComponent(UaNode parent, UaInstance component) throws StatusException
addNodeAndReference(parent, variable, Identifiers.HasComponent);parent - component - StatusExceptionpublic UaNode addNode(UaNode newNode) throws StatusException
addNode in class NodeManagernewNode - the node to add. The NodeId of the node must have the same namepsaceIndex as the
node manager.StatusException - if the NodeId exists or is invalid (i.e. null)NullPointerException - if the newNode parameter is nullpublic UaNode addNodeAndReference(UaNode parent, UaNode newNode, NodeId referenceTypeId) throws StatusException
parent - newNode - referenceTypeId - StatusExceptionpublic void addReference(NodeId sourceId, ExpandedNodeId targetId, NodeId referenceTypeId, boolean isInverse) throws StatusException
sourceId - id for the sourcetargetId - id for the target, may contain ServerIndexreferenceTypeId - id of the ReferenceTypeisInverse - Is the reference inverseStatusException - if the source node cannot be foundpublic void addReference(NodeId sourceId, NodeId targetId, NodeId referenceTypeId, boolean isInverse) throws StatusException
sourceId - Id for sourcetargetId - Id for targetreferenceTypeId - Id for reference typeisInverse - Is this an inverse referenceStatusException - If the source node cannot be found.public void addReference(UaNode sourceNode, UaNode targetNode, NodeId referenceTypeId, boolean isInverse)
sourceNode - the source nodetargetNode - the target nodereferenceTypeId - the reference typeisInverse - is this an inverse referencepublic <T extends UaType> T addType(ExpandedNodeId newTypeDefinitionId, String name, T baseType) throws UaNodeFactoryException, StatusException
public <T extends UaType> T addType(NodeId nodeId, String name, T baseType) throws StatusException, UaNodeFactoryException
nodeId - The ID of the node. May not be a Null NodeId (or you get StatusException)name - The Node Name, which is used to initialize the BrowseName and DisplayName (with
defaultLocale)baseType - The "parent" type in the address space. Must be defined.StatusException - if the NodeId exists or is null.UaNodeFactoryException - if the new node cannot be created. Check NodeFactory that it
defines a proper type for the type nodes.public <T extends BaseEventType> T createEvent(Class<T> clazz)
BaseEventTypeNode.triggerEvent(com.prosysopc.ua.stack.builtintypes.ByteString) for the object.clazz - The event classpublic <T extends BaseEventType> T createEvent(Class<T> clazz, UaNodeBuilderConfiguration configuration)
BaseEventTypeNode.triggerEvent(com.prosysopc.ua.stack.builtintypes.ByteString) for the object.clazz - The event classconfiguration - configuration for node creationpublic <T extends BaseEventType> T createEvent(ExpandedNodeId eventTypeId)
BaseEventTypeNode.triggerEvent(com.prosysopc.ua.stack.builtintypes.ByteString) for the object.eventTypeId - The event type to createpublic <T extends BaseEventType> T createEvent(ExpandedNodeId eventTypeId, UaNodeBuilderConfiguration configuration)
BaseEventTypeNode.triggerEvent(com.prosysopc.ua.stack.builtintypes.ByteString) for the object.eventTypeId - The event type to createconfiguration - configuration for node creationpublic <T extends BaseEventType> T createEvent(NodeId eventTypeId)
BaseEventTypeNode.triggerEvent(com.prosysopc.ua.stack.builtintypes.ByteString) for the object.eventTypeId - The event type to createpublic <T extends BaseEventType> T createEvent(NodeId eventTypeId, UaNodeBuilderConfiguration configuration)
BaseEventTypeNode.triggerEvent(com.prosysopc.ua.stack.builtintypes.ByteString) for the object.eventTypeId - The event type to createconfiguration - configuration for node creationpublic FolderType createFolder(String name, NodeId newNodeId)
public <T extends UaInstance> T createInstance(Class<T> clazz, NodeId newNodeId, QualifiedName browseName, LocalizedText displayName)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
If you wish to parameterize the node builder, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(YourClass.class, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.newNodeId - The requested NodeId of the new instance. This is also used as a basis for the
sub-nodes of the instance.browseName - The browse name for the instance.displayName - The localizable display name for the instance.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public <T extends UaInstance> T createInstance(Class<T> clazz, String name)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
NodeId of the new instance will be generated from the name. You can use the other (overloaded) versions of the method to provide a specific NodeId instead.
If you wish to parameterize the node builder more, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(typeDefinitionId, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.name - Name of the new instance: this is used to create the NodeId and as a basis for the
BrowseName and DisplayName.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public <T extends UaInstance> T createInstance(Class<T> clazz, String name, NodeId newNodeId)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
If you wish to parameterize the node builder, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(YourClass.class, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.name - Name of the new instance: this is used as a basis for the BrowseName and
DisplayName.newNodeId - The NodeId of the new instance.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public UaInstance createInstance(ExpandedNodeId typeId, NodeId newNodeId, QualifiedName browseName, LocalizedText displayName)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
If you wish to parameterize the node builder, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(YourClass.class, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.name - Name of the new instance: this is used to create the NodeId and as a basis for the
BrowseName and DisplayName.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public UaInstance createInstance(ExpandedNodeId typeId, String name)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
NodeId of the new instance will be generated from the name. You can use the other (overloaded) versions of the method to provide a specific NodeId instead.
If you wish to parameterize the node builder more, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(typeDefinitionId, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.name - Name of the new instance: this is used to create the NodeId and as a basis for the
BrowseName and DisplayName.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public UaInstance createInstance(ExpandedNodeId typeId, String name, NodeId newNodeId)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
If you wish to parameterize the node builder, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(YourClass.class, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.name - Name of the new instance: this is used as a basis for the BrowseName and
DisplayName.newNodeId - The NodeId of the new instance.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public UaInstance createInstance(NodeId typeId, NodeId newNodeId, QualifiedName browseName, LocalizedText displayName)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
If you wish to parameterize the node builder, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(YourClass.class, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The instance class to create. It must have the TypeDefinitionId
annotation.newNodeId - The requested NodeId of the new instance. This is also used as a basis for the
sub-nodes of the instance.browseName - The browse name for the instance.displayName - The localizable display name for the instance.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public UaInstance createInstance(NodeId typeDefinitionId, String name)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
NodeId of the new instance will be generated from the name. You can use the other (overloaded) versions of the method to provide a specific NodeId instead.
If you wish to parameterize the node builder more, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(typeDefinitionId, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
typeDefinitionId - The UA type of the instance to create. Will use this to determine the
respective instance class to create.name - Name of the new instance: this is used to create the NodeId and as a basis for the
BrowseName and DisplayName.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public UaInstance createInstance(NodeId typeDefinitionId, String name, NodeId newNodeId)
The type of the instance is determined from the TypeDefinitionId annotation of the class, which must be defined.
If you wish to parameterize the node builder, for example to define which optional elements should be created, you should use the NodeBuilder, e.g.:
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(typeDefinitionId, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
typeDefinitionId - The UA type of the instance to create. Will use this to determine the
respective instance class to create.name - Name of the new instance: this is used as a basis for the BrowseName and
DisplayName.newNodeId - The NodeId of the new instance.UaInstantiationException - if the instance cannot be created.createNodeBuilder(java.lang.Class<T>)public <T extends UaInstance> NodeBuilder<T> createNodeBuilder(Class<T> clazz)
clazz - The class of the instance to build. It must have the TypeDefinitionId
annotation.UaInstantiationException - if the type node does not exist or it is invalid for
instantiation.createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)public <T extends UaInstance> NodeBuilder<T> createNodeBuilder(Class<T> clazz, UaNodeBuilderConfiguration configuration)
Used to customize the node to be built more than what is possible with createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(YourClass.class, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
clazz - The class of the instance to build. It must have the TypeDefinitionId
annotation.configuration - The configuration to use for the builder.UaInstantiationException - if the type node does not exist or it is invalid for
instantiation.createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)public <T extends UaInstance> NodeBuilder<T> createNodeBuilder(ExpandedNodeId typeDefinitionId)
typeDefinitionId - The ExpandedNodeId of the instantiated type.UaInstantiationException - if the type node does not exist or it is invalid for
instantiation.createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)public <T extends UaInstance> NodeBuilder<T> createNodeBuilder(ExpandedNodeId typeId, UaNodeBuilderConfiguration configuration)
Used to customize the node to be built more than what is possible with createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(typeDefinitionId, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
typeDefinitionId - The ExpandedNodeId of the instantiated type.configuration - The configuration to use for the builder.UaInstantiationException - if the type node does not exist or it is invalid for
instantiation.createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)public <T extends UaInstance> NodeBuilder<T> createNodeBuilder(NodeId typeDefinitionId)
typeDefinitionId - The NodeId of the instantiated type.UaInstantiationException - if the type node does not exist or it is invalid for
instantiation.createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)public <T extends UaInstance> NodeBuilder<T> createNodeBuilder(NodeId typeId, UaNodeBuilderConfiguration configuration)
Used to customize the node to be built more than what is possible with createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)
UaNodeBuilderConfiguration conf = new NodeBuilderConfiguration(); conf.addOptional(...); NodeBuildernb = createNodeBuilder(typeDefinitionId, conf); nb.setBrowseName(browseName); nb.setDisplayName(displayName); nb.setNodeId(newNodeId); YourClass instance = nb.build();
typeDefinitionId - The NodeId of the instantiated type.configuration - The configuration to use for the builder.UaInstantiationException - if the type node does not exist or it is invalid for
instantiation.createInstance(java.lang.Class<T>, com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.builtintypes.QualifiedName, com.prosysopc.ua.stack.builtintypes.LocalizedText)public NodeId createNodeId(UaNode parent, QualifiedName name)
createNodeId(UaNode, QualifiedName, int)public NodeId createNodeId(UaNode parent, QualifiedName name, int namespaceIndex)
parent - the parent node, must not be nullname - the name of the sub-nodenamespaceIndex - the namespacIndex to use for the NodeIdpublic NodeId createNodeId(UaNode parent, String name)
parent - the parent node - must not be nullname - the name of the property, used for both BrowseName and DisplayNamepublic NodeId createNodeId(UaNode parent, String name, int namespaceIndex)
parent - the parent node - must not be nullname - the [Name] to append to the ID of the parentnamespaceIndex - the namespacIndex to use for the NodeId. If you omit it, the
namespaceIndex of the NodeManager is used.public UaNode deleteNode(NodeId nodeId, boolean deleteTargetReferences, boolean deleteChildren) throws StatusException
nodeId - the node to deletedeleteTargetReferences - whether to also delete references in which this node is the
targetdeleteChildren - whether to also remove all child nodes, i.e.those that are connected to
this node using a forward HasChild reference.StatusException - if the deletion fails. Possible status codes: Bad_NodeIdInvalid,
Bad_NodeIdUnknown, Bad_UserAccessDenied, Bad_NoDeleteRights,
Uncertain_ReferenceNotDeletedpublic UaNode deleteNode(UaNode node, boolean deleteTargetReferences, boolean deleteChildren) throws StatusException
node - the node to delete, if null, null is returneddeleteTargetReferences - whether to also delete references in which this node is the
target. If this cannot be done, a StatusException(Uncertain_ReferenceNotDeleted) is
thrown.deleteChildren - whether to also remove all child nodes, i.e. those that are connected to
this node using a forward HasChild reference. The removal of children works for nodes
that are in the same NodeManager or on some other NodeManagerUaNode.StatusException - if the deletion fails. Possible status codes: Bad_NodeIdInvalid,
Bad_NodeIdUnknown, Bad_UserAccessDenied, Bad_NoDeleteRights,
Uncertain_ReferenceNotDeletedpublic void deleteReference(NodeId sourceNodeId, ExpandedNodeId targetNodeId, NodeId referenceTypeId) throws StatusException
sourceNodeId - the source node of the referencetargetNodeId - the target of the referencereferenceTypeId - reference typeStatusException - if targetNodeId refers to a local node, which does not existpublic void deleteReference(UaNode sourceNode, ExpandedNodeId targetNodeId, NodeId referenceTypeId) throws StatusException
sourceNode - the source node of the referencetargetNodeId - the target of the referencereferenceTypeId - reference typeStatusException - if targetNodeId refers to a local node, which does not existpublic void deleteReference(UaNode sourceNode, UaNode targetNode, NodeId referenceTypeId) throws StatusException
sourceNode - the source node of the referencetargetNode - the target of the referencereferenceTypeId - reference typeStatusException - if targetNodeId refers to a local node, which does not existpublic UaNode findNode(NodeId nodeId)
NodeManagerNodeManager.supportsUaNode(). You
should use NodeManager.hasNode(com.prosysopc.ua.stack.builtintypes.NodeId) to check if the Node Manager has a nodefindNode in class NodeManagernodeId - the nodeId to look forNodeManager.getNode(NodeId)public UaDataType getDataType(NodeId dataTypeId) throws StatusException
UaDataType node for the id.dataTypeId - id for the nodeStatusException - if node does not existClassCastException - if the given node is not UaDataTypepublic IoManagerUaNode getIoManager()
getIoManager in class NodeManagerpublic UaNodeBuilderConfiguration getNodeBuilderConfiguration()
NodeBuilder configuration that this manager uses. NOTE! by default the
NodeManagerUaNode uses the configuration from
NodeManagerTable.getNodeBuilderConfiguration(), therefore unless this has been
overridden by calling
setNodeBuilderConfiguration(UaNodeBuilderConfiguration), this method
will return the configuration defined in NodeManagerTable.public UaNodeFactory getNodeFactory()
public char getNodeIdDelimiter()
public String getNodeIdFormat()
public UaNode getNodeOrExternal(NodeId nodeId)
public UaNode getNodeOrExternalIfExist(NodeId nodeId)
public NodeMap getNodes()
public UaType getType(NodeId typeId) throws StatusException
typeId - the NodeId of the typeStatusException - if the node is not foundpublic NodeId getVariableDataType(NodeId nodeId, UaValueNode variable) throws StatusException
NodeManagergetVariableDataType in class NodeManagernodeId - The NodeId of the variable, whose data type is requested.variable - the variable or variableType node, if such existsStatusExceptionpublic boolean hasNode(NodeId nodeId)
NodeManagerOverride in your own NodeManager to return true for your own nodes.
hasNode in class NodeManagerpublic void setNodeBuilderConfiguration(UaNodeBuilderConfiguration nodeBuilderConfiguration)
NodeBuilder configuration for this manager. NOTE! in most cases, it is
easier to override the configuration by calling
NodeManagerTable.setNodeBuilderConfiguration(UaNodeBuilderConfiguration), so it affects
all managers. Use this only when you need different configuration per manager. NOTE! calling
with null parameter resets this manager to default to the configuration defined in
NodeManagerTable.nodeBuilderConfiguration - the nodeBuilderConfiguration to setpublic void setNodeFactory(UaNodeFactory nodeFactory)
nodeFactory - the nodeFactory to setpublic void setNodeIdDelimiter(char nodeIdDelimiter)
nodeIdDelimiter - the nodeIdDelimiter to setpublic boolean supportsUaNode()
NodeManagerChange in your own node manager, if you want to use UaNode. In that case, also consider inheriting your NodeManager from NodeManagerUaNode instead.
Note: If you define supportsUaNode = true, you must also implement
NodeManager.findNode(ExpandedNodeId)!
supportsUaNode in class NodeManagerUaNode objects are supported.public UaNodeSet toNodeSet()
UaNodeSet from the nodes of this NodeManagerUaNode.protected NodeId addNode(ServiceContext serviceContext, NodeId nodeId, NodeId parentNodeId, QualifiedName browseName, NodeClass nodeClass, ExpandedNodeId typeDefinitionId, NodeAttributes attributes, NodeId referenceTypeId) throws StatusException
NodeManageraddNode in class NodeManagerStatusExceptionprotected void addReference(ServiceContext serviceContext, NodeId sourceNodeId, ExpandedNodeId targetNodeId, NodeId referenceTypeId, boolean isForward, NodeClass targetNodeClass, String targetServerUri) throws StatusException
NodeManageraddReference in class NodeManagerStatusExceptionprotected void close()
NodeManagerclose in class NodeManagerprotected void createMonitoredDataItem(ServiceContext serviceContext, Subscription subscription, NodeId nodeId, UnsignedInteger attributeId, NumericRange indexRange, MonitoringParameters params, MonitoringFilter filter, AggregateFilterResult filterResult, MonitoringMode monitoringMode) throws StatusException
NodeManagercreateMonitoredDataItem in class NodeManagerserviceContext - the client calling contextsubscription - the subscription in which the item is being created.nodeId - the node ID: get the respective node from from the nodeManager.attributeId - the attribute ID: check from the node that it supports the attribute.indexRange - the index range specificationparams - the monitoring parametersfilter - an optional filter for the item. This may be a DataChangeFilter or
AggregateFilterResultfilterResult - results for the aggregateFilter, if such is providedmonitoringMode - the requested MonitoringModeStatusException - if the node is invalid (Bad_NodeIdUnknown) or the attributeId is not
supported by the node (Bad_AttributeIdInvalid).protected UaNode createNodeForAddNodesRequest(NodeId nodeId, QualifiedName browseName, NodeClass nodeClass, ExpandedNodeId typeDefinitionId, LocalizedText displayName)
protected UaNode createNodeForNodeSet2(NodeId nodeId, QualifiedName browseName, NodeClass nodeClass, ExpandedNodeId typeDefinitionId, LocalizedText displayName)
protected NodeMap createNodeMap()
protected void deleteNode(ServiceContext serviceContext, NodeId nodeId, Boolean deleteTargetReferences) throws StatusException
deleteNode in class NodeManagerStatusExceptionprotected UaNode deleteNode(UaNode node, boolean deleteTargetReferences, boolean deleteChildren, boolean doNotDeleteIfInverseHierarchicalRefs) throws StatusException
StatusExceptionprotected void deleteReference(ServiceContext serviceContext, NodeId sourceNodeId, ExpandedNodeId targetNodeId, NodeId referenceTypeId, Boolean isForward, Boolean deleteBidirectional) throws StatusException
deleteReference in class NodeManagerStatusExceptionprotected QualifiedName getBrowseName(ExpandedNodeId nodeId, UaNode node)
NodeManagerNodeManagerUaNode implements the method by getting the BrowseName from the targetNode.
For custom NodeManagers this must be implemented.
getBrowseName in class NodeManagernodeId - the ID of the nodenode - the node, if it is a UaNode. May be null.protected LocalizedText getDisplayName(ExpandedNodeId nodeId, UaNode node, Locale locale)
NodeManagerNodeManagerUaNode implements the method by getting the DisplayName from the targetNode
For custom NodeManagers this must be implemented.
getDisplayName in class NodeManagernodeId - the ID of the nodelocale - The locale in which the name is requested. May be null.protected UaNode getNode(ExpandedNodeId nodeId, UnsignedInteger errorCode) throws StatusException
nodeId - the ID of the nodeerrorCode - The error code to return, instead of Bad_NodeIdUnknown, if the node is not
foundStatusException - if the node is not found or the ID is invalidprotected UaNode getNode(NodeId nodeId, UnsignedInteger errorCode) throws StatusException
nodeId - the ID of the nodeerrorCode - The error code to return, instead of Bad_NodeIdUnknown, if the node is not
foundStatusException - if the node is not found or the ID is invalidprotected NodeClass getNodeClass(NodeId nodeId, UaNode node)
NodeManagerNodeManager.findNodeClass(ExpandedNodeId, UaNode) to search for the NodeClass of any node,
possibly owned by some other NodeManager.getNodeClass in class NodeManagernodeId - node - protected UaReference[] getReferences(NodeId nodeId, UaNode node)
NodeManagergetReferences in class NodeManagernodeId - the ID of the nodenode - the node object, if availableprotected ExpandedNodeId getTypeDefinition(ExpandedNodeId nodeId, UaNode node)
NodeManagerNodeManagerUaNode implements the method by getting the TypeDefinitionId from the node.
For custom NodeManagers this must be implemented.
getTypeDefinition in class NodeManagernodeId - the ID of the nodenode - the node, if it is a UaNode. May be null.protected void replaceExternalNode(UaExternalNode oldNode, UaNode newNode) throws StatusException
oldNode - newNode - StatusExceptionprotected boolean requireUaNode()
requireUaNode in class ServiceManagerBaseCopyright © 2026. All rights reserved.