public class NodeManagerRoot extends NodeManagerUaNode
NodeManagerRoot is also used to trigger ModelChangeEvents (see beginModelChange() &
endModelChange()).
NOTE! This class should be considered as-if it would have the 'final' modifier. Under normal conditions this class should not be extended, that can lead to security issues if done incorrectly.
initialized, started| Constructor and Description |
|---|
NodeManagerRoot(UaServer server) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModelChange(NodeId nodeAffected,
NodeId typeDefinition,
ModelChangeType... changeTypes)
Adds a change to the ModelChangeEvent, if one is active.
|
void |
addModelChange(UaNode nodeAffected,
ModelChangeType... changeTypes)
Adds a change to the ModelChangeEvent, if one is active.
|
protected NodeId |
addNode(ServiceContext serviceContext,
NodeId nodeId,
NodeId parentNodeId,
QualifiedName browseName,
NodeClass nodeClass,
ExpandedNodeId typeDefinitionId,
NodeAttributes attributes,
NodeId referenceTypeId)
Handle adding a new node.
|
protected void |
addReference(ServiceContext serviceContext,
NodeId sourceNodeId,
ExpandedNodeId targetNodeId,
NodeId referenceTypeId,
boolean isForward,
NodeClass targetNodeClass,
String targetServerUri)
Handle adding a reference.
|
void |
addSemanticChange(UaNode nodeAffected) |
void |
beginModelChange()
Begins a model change operation.
|
void |
beginSemanticChange()
Begins a semantic change operation.
|
protected void |
deleteNode(ServiceContext serviceContext,
NodeId nodeId,
Boolean deleteTargetReferences) |
protected void |
deleteReference(ServiceContext serviceContext,
NodeId sourceNodeId,
ExpandedNodeId targetNodeId,
NodeId referenceTypeId,
Boolean isForward,
Boolean deleteBidirectional) |
void |
endModelChange()
Ends a model change started with
beginModelChange() and triggers the ModelChangeEvent. |
ByteString |
endSemanticChange()
Ends a semantic change started with
beginSemanticChange(). |
protected AccessLevelType |
getAccessLevelForSecurityDiagnostics(ServiceContext serviceContext)
Handle security checks for diagnostics.
|
protected UaDataType |
getBaseDataType() |
protected UaVariableType |
getBaseDataVariableType() |
protected UaObjectType |
getBaseObjectType() |
protected UaReferenceType |
getBaseReferenceType() |
protected UaVariableType |
getBaseVariableType() |
DataTypeConverter |
getDataTypeConverter() |
FolderType |
getDataTypesFolder() |
FolderType |
getEventTypesFolder() |
GeneralModelChangeEvent |
getModelChangeEvent()
Get access to the contents of the current modelChangeEvent.
|
UaNodeSet.ModelInfo |
getModelInfo()
Returns the
UaNodeSet.ModelInfo of the standard namespace. |
int |
getNamespaceIndex() |
FolderType |
getObjectsFolder()
This is the root of the Objects folder, containing all object definitions.
|
FolderType |
getObjectTypesFolder() |
FolderType |
getReferenceTypesFolder() |
FolderType |
getRoot()
This is the ultimate root of the client address space.
|
SemanticChangeEvent |
getSemanticChangeEvent()
Get access to the contents of the current semanticChangeEvent.
|
ServerTypeNode |
getServerData() |
FolderType |
getTypesFolder()
This is the root of the Types folder, containing all type definitions.
|
FolderType |
getVariableTypesFolder() |
FolderType |
getViewsFolder()
This is the root of the Views folder, containing all view definitions.
|
protected void |
init()
Initialize the NodeManager.
|
protected void |
shutdown(int secondsTillShutdown,
LocalizedText shutdownReason) |
protected void |
start()
Start the NodeManager, i.e.
|
addComponent, addNode, addNodeAndReference, addReference, addReference, addReference, addType, addType, close, createEvent, createEvent, createEvent, createEvent, createEvent, createEvent, createFolder, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createMonitoredDataItem, createNodeBuilder, createNodeBuilder, createNodeBuilder, createNodeBuilder, createNodeBuilder, createNodeBuilder, createNodeForAddNodesRequest, createNodeForNodeSet2, createNodeId, createNodeId, createNodeId, createNodeId, createNodeMap, deleteNode, deleteNode, deleteNode, deleteReference, deleteReference, deleteReference, findNode, getBrowseName, getDataType, getDisplayName, getIoManager, getNode, getNode, getNodeBuilderConfiguration, getNodeClass, getNodeFactory, getNodeIdDelimiter, getNodeIdFormat, getNodeOrExternal, getNodeOrExternalIfExist, getNodes, getReferences, getType, getTypeDefinition, getVariableDataType, hasNode, replaceExternalNode, requireUaNode, setNodeBuilderConfiguration, setNodeFactory, setNodeIdDelimiter, supportsUaNode, toNodeSetaddListener, 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, getNamespaceTable, getNamespaceUri, getNode, getNode, getNodeClass, getNodeId, getQualifiedName, getReferences, getReferenceType, hasListener, invalidatePreviousNodeCache, isInitialized, isOfType, isStarted, modifyMonitoredDataItem, modifyMonitoredEventItem, queryFirst, queryNext, referenceMatchesRequest, registerNode, removeListener, setDefaultLocale, setEventManager, setHistoryManager, setIoManager, setMethodManager, toString, translateBrowsePath, unregisterNodearrayDimensionsMatch, checkIsMethod, checkIsValueNode, checkIsVariable, checkIsVariableOrVariableType, dataTypeEquals, getNode, getNode, getNodeManagerTable, getServer, getSubscriptionManager, isValueNode, isVariable, listenerErrorpublic NodeManagerRoot(UaServer server)
server - public void addModelChange(NodeId nodeAffected, NodeId typeDefinition, ModelChangeType... changeTypes)
beginModelChange() before calling addModelChange.
Note: Adding and deleting nodes to NodeManagerUaNode objects and references to BaseNode:s will
call #addModelChange(UaNode, ChangeType...) automatically.
nodeAffected - the affected nodetypeDefinition - the type of nodechangeTypes - the types of changepublic void addModelChange(UaNode nodeAffected, ModelChangeType... changeTypes)
beginModelChange() before calling addModelChange.
Note: Adding and deleting nodes to NodeManagerUaNode objects and references to BaseNode:s will call this method automatically.
The NodeVersion property must also be enabled in the Node objects (by calling
BaseNode.incNodeVersion() once), before the changes are accepted to the
ModelChangeEvent - the version will be automatically incremented when endModelChange()
is called and the event is sent to the clients.
nodeAffected - the affected nodechangeTypes - the types of changepublic void addSemanticChange(UaNode nodeAffected)
nodeAffected - the affected nodepublic void beginModelChange()
All node and reference additions and deletions done using UaNode:s (or BaseNode:s specifically)
will call #addModelChange(UaNode, ChangeType...) automatically, and these are recorded
when a ModelChangeEvent is activated with this method.
The change is finally ended with endModelChange(), which triggers the event.
Note: The nodes must define the NodeVersion property before they are accepted to the
ModelChangeEvent (you can define it with BaseNode.incNodeVersion()).
public void beginSemanticChange()
All node modifications that result in a BaseNode#semanticChange being called
The change is finally ended with endSemanticChange(), which triggers the event.
public void endModelChange()
beginModelChange() and triggers the ModelChangeEvent.
Also increases the NodeVersion of the affectedNodes (if they are BaseNodes).
If the list of changes to report is empty, will not send any events.
public ByteString endSemanticChange()
beginSemanticChange(). If several begin/end-calls
are nested, the last endSemanticChange call will trigger the SemanticChangeEvent.public DataTypeConverter getDataTypeConverter()
ServiceManagerBase.getNodeManagerTable().public FolderType getDataTypesFolder()
public FolderType getEventTypesFolder()
public GeneralModelChangeEvent getModelChangeEvent()
beginModelChange() to
start a model change and endModelChange() to end it. All node modifications done
between them are recorded and sent to the clients that are listening to the event.
Alternatively, you can access and fill the event yourself.
public UaNodeSet.ModelInfo getModelInfo()
UaNodeSet.ModelInfo of the standard namespace.public int getNamespaceIndex()
getNamespaceIndex in class NodeManagerNodeManager.getNamespaceUri()public FolderType getObjectsFolder()
public FolderType getObjectTypesFolder()
public FolderType getReferenceTypesFolder()
public FolderType getRoot()
public SemanticChangeEvent getSemanticChangeEvent()
beginModelChange() to start a model change and endModelChange() to end it.
All node modifications done between them are recorded and sent to the clients that are
listening to the event.
Alternatively, you can access and fill the event yourself.
public ServerTypeNode getServerData()
public FolderType getTypesFolder()
public FolderType getVariableTypesFolder()
public FolderType getViewsFolder()
protected NodeId addNode(ServiceContext serviceContext, NodeId nodeId, NodeId parentNodeId, QualifiedName browseName, NodeClass nodeClass, ExpandedNodeId typeDefinitionId, NodeAttributes attributes, NodeId referenceTypeId) throws StatusException
NodeManageraddNode in class NodeManagerUaNodeStatusExceptionprotected void addReference(ServiceContext serviceContext, NodeId sourceNodeId, ExpandedNodeId targetNodeId, NodeId referenceTypeId, boolean isForward, NodeClass targetNodeClass, String targetServerUri) throws StatusException
NodeManageraddReference in class NodeManagerUaNodeStatusExceptionprotected void deleteNode(ServiceContext serviceContext, NodeId nodeId, Boolean deleteTargetReferences) throws StatusException
deleteNode in class NodeManagerUaNodeStatusExceptionprotected void deleteReference(ServiceContext serviceContext, NodeId sourceNodeId, ExpandedNodeId targetNodeId, NodeId referenceTypeId, Boolean isForward, Boolean deleteBidirectional) throws StatusException
deleteReference in class NodeManagerUaNodeStatusExceptionprotected AccessLevelType getAccessLevelForSecurityDiagnostics(ServiceContext serviceContext)
UaServer.NodeManagerUaServer.protected UaDataType getBaseDataType()
protected UaVariableType getBaseDataVariableType()
protected UaObjectType getBaseObjectType()
protected UaReferenceType getBaseReferenceType()
protected UaVariableType getBaseVariableType()
protected void init()
throws RuntimeException
NodeManagerinit in class NodeManagerRuntimeExceptionUaNodeFactoryExceptionprotected void shutdown(int secondsTillShutdown,
LocalizedText shutdownReason)
secondsTillShutdown - shutdownReason - StatusExceptionprotected void start()
throws StatusException,
UaNodeFactoryException
NodeManagerstart in class NodeManagerStatusExceptionUaNodeFactoryExceptionCopyright © 2026. All rights reserved.