java.lang.Object
org.eclipse.milo.opcua.sdk.client.AddressSpace

public class AddressSpace extends Object
  • Constructor Details

    • AddressSpace

      public AddressSpace(OpcUaClient client)
  • Method Details

    • getNode

      public UaNode getNode(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId) throws org.eclipse.milo.opcua.stack.core.UaException
      Get a UaNode instance for the Node identified by nodeId.
      Parameters:
      nodeId - the NodeId identifying the Node to get.
      Returns:
      a UaNode instance for the Node identified by nodeId.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the Node.
    • getNodeAsync

      public CompletableFuture<? extends UaNode> getNodeAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId)
      Get a UaNode instance for the Node identified by nodeId.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId identifying the Node to get.
      Returns:
      a CompletableFuture that completes successfully with the UaNode instance or completes exceptionally if a service-level error occurs.
    • getObjectNode

      public UaObjectNode getObjectNode(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId) throws org.eclipse.milo.opcua.stack.core.UaException
      Get a UaObjectNode instance for the ObjectNode identified by nodeId.

      The type definition will be read when the instance is created. If this type definition is registered with the ObjectTypeManager a UaObjectNode of the appropriate subclass will be returned.

      Parameters:
      nodeId - the NodeId identifying the ObjectNode to get.
      Returns:
      a UaObjectNode instance for the ObjectNode identified by nodeId.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the ObjectNode.
    • getObjectNode

      public UaObjectNode getObjectNode(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId typeDefinitionId) throws org.eclipse.milo.opcua.stack.core.UaException
      Get a UaObjectNode instance for the ObjectNode identified by nodeId, assuming the type definition identified by typeDefinitionId.

      If this type definition is registered with the ObjectTypeManager a UaObjectNode of the appropriate subclass will be returned.

      Parameters:
      nodeId - the NodeId identifying the ObjectNode to get.
      typeDefinitionId - the NodeId identifying the type definition.
      Returns:
      a UaObjectNode instance for the ObjectNode identified by nodeId.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the ObjectNode.
    • getObjectNodeAsync

      public CompletableFuture<UaObjectNode> getObjectNodeAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId)
      Get a UaObjectNode instance for the ObjectNode identified by nodeId.

      The type definition will be read when the instance is created. If this type definition is registered with the ObjectTypeManager a UaObjectNode of the appropriate subclass will be returned.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId identifying the ObjectNode to get.
      Returns:
      a CompletableFuture that completes successfully with a UaObjectNode instance for the ObjectNode identified by nodeId or completes exceptionally if an error occurs creating the ObjectNode.
    • getObjectNodeAsync

      public CompletableFuture<UaObjectNode> getObjectNodeAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId typeDefinitionId)
      Get a UaObjectNode instance for the ObjectNode identified by nodeId, assuming the type definition identified by typeDefinitionId.

      If this type definition is registered with the ObjectTypeManager a UaObjectNode of the appropriate subclass will be returned.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId identifying the ObjectNode to get.
      typeDefinitionId - the NodeId identifying the type definition.
      Returns:
      a CompletableFuture that completes successfully with a UaObjectNode instance for the ObjectNode identified by nodeId or completes exceptionally if an error occurs creating the ObjectNode.
    • getVariableNode

      public UaVariableNode getVariableNode(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId) throws org.eclipse.milo.opcua.stack.core.UaException
      Get a UaVariableNode instance for the VariableNode identified by nodeId.

      The type definition will be read when the instance is created. If this type definition is registered with the VariableTypeManager a UaVariableNode of the appropriate subclass will be returned.

      Parameters:
      nodeId - the NodeId identifying the VariableNode to get.
      Returns:
      a UaVariableNode instance for the VariableNode identified by nodeId.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the VariableNode.
    • getVariableNode

      public UaVariableNode getVariableNode(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId typeDefinitionId) throws org.eclipse.milo.opcua.stack.core.UaException
      Get a UaVariableNode instance for the VariableNode identified by nodeId, assuming the type definition identified by typeDefinitionId.

      If this type definition is registered with the VariableTypeManager a UaVariableNode of the appropriate subclass will be returned.

      Parameters:
      nodeId - the NodeId identifying the VariableNode to get.
      typeDefinitionId - the NodeId identifying the type definition.
      Returns:
      a UaVariableNode instance for the VariableNode identified by nodeId.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the VariableNode.
    • getVariableNodeAsync

      public CompletableFuture<UaVariableNode> getVariableNodeAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId)
      Get a UaVariableNode instance for the VariableNode identified by nodeId.

      The type definition will be read when the instance is created. If this type definition is registered with the VariableTypeManager a UaVariableNode of the appropriate subclass will be returned.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId identifying the VariableNode to get.
      Returns:
      a CompletableFuture that completes successfully with a UaVariableNode instance for the VariableNode identified by nodeId or completes exceptionally if an error occurs while creating the VariableNode.
    • getVariableNodeAsync

      public CompletableFuture<UaVariableNode> getVariableNodeAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId typeDefinitionId)
      Get a UaVariableNode instance for the VariableNode identified by nodeId, assuming the type definition identified by typeDefinitionId.

      If this type definition is registered with the VariableTypeManager a UaVariableNode of the appropriate subclass will be returned.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId identifying the VariableNode to get.
      typeDefinitionId - the NodeId identifying the type definition.
      Returns:
      a CompletableFuture that completes successfully with a UaVariableNode instance for the VariableNode identified by nodeId or completes exceptionally if an error occurs while creating the VariableNode.
    • getObjectsFolderNode

      public UaObjectNode getObjectsFolderNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaObjectNode instance for the Objects Folder Node.
      Returns:
      the UaObjectNode instance for the Objects Folder Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the Objects Folder Node.
    • getRootFolderNode

      public UaObjectNode getRootFolderNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaObjectNode instance for the Root Folder Node.
      Returns:
      the UaObjectNode instance for the Root Folder Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the Root Folder Node.
    • getTypesFolderNode

      public UaObjectNode getTypesFolderNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaObjectNode instance for the Types Folder Node.
      Returns:
      the UaObjectNode instance for the Types Folder Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the Types Folder Node.
    • getServerNode

      public ServerTypeNode getServerNode() throws org.eclipse.milo.opcua.stack.core.UaException
      Get the ServerTypeNode instance for the Server Node.
      Returns:
      the ServerTypeNode instance for the Server Node.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the Server Node.
    • browse

      public List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription> browse(UaNode node) throws org.eclipse.milo.opcua.stack.core.UaException
      Call the Browse service to get a UaNode's references using the currently configured AddressSpace.BrowseOptions.
      Parameters:
      node - the UaNode to browse.
      Returns:
      a List of ReferenceDescriptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.
      See Also:
    • browse

      public List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription> browse(UaNode node, AddressSpace.BrowseOptions browseOptions) throws org.eclipse.milo.opcua.stack.core.UaException
      Call the Browse service to get a UaNode's references.
      Parameters:
      node - the UaNode to browse.
      browseOptions - the AddressSpace.BrowseOptions to browse with.
      Returns:
      a List of ReferenceDescriptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.
    • browse

      public List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription> browse(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId) throws org.eclipse.milo.opcua.stack.core.UaException
      Call the Browse service to get a Node's references using the currently configured AddressSpace.BrowseOptions.
      Parameters:
      nodeId - the NodeId of the Node to browse.
      Returns:
      a List of ReferenceDescriptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.
      See Also:
    • browse

      public List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription> browse(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, AddressSpace.BrowseOptions browseOptions) throws org.eclipse.milo.opcua.stack.core.UaException
      Call the Browse service to get a Node's references.
      Parameters:
      nodeId - the NodeId of the Node to browse.
      browseOptions - the AddressSpace.BrowseOptions to browse with.
      Returns:
      a List of ReferenceDescriptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.
    • browseAsync

      public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription>> browseAsync(UaNode node)
      Call the Browse service to get a UaNode's references using the currently configured AddressSpace.BrowseOptions.

      This call completes asynchronously.

      Parameters:
      node - the UaNode to browse.
      Returns:
      a CompletableFuture that completes successfully with the List of references or completes exceptionally if a service-level error occurs.
      See Also:
    • browseAsync

      public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription>> browseAsync(UaNode node, AddressSpace.BrowseOptions browseOptions)
      Call the Browse service to get a UaNode's references.

      This call completes asynchronously.

      Parameters:
      node - the UaNode to browse.
      browseOptions - the AddressSpace.BrowseOptions to browse with.
      Returns:
      a CompletableFuture that completes successfully with the List of references or completes exceptionally if a service-level error occurs.
    • browseAsync

      public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription>> browseAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId)
      Call the Browse service to get a Node's references using the currently configured AddressSpace.BrowseOptions.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId of the Node to browse.
      Returns:
      a CompletableFuture that completes successfully with the List of references or completes exceptionally if a service-level error occurs.
      See Also:
    • browseAsync

      public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription>> browseAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, AddressSpace.BrowseOptions browseOptions)
      Call the Browse service to get a Node's references.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId of the Node to browse.
      browseOptions - the AddressSpace.BrowseOptions to browse with.
      Returns:
      a CompletableFuture that completes successfully with the List of references or completes exceptionally if a service-level error occurs.
    • browseNodes

      public List<? extends UaNode> browseNodes(UaNode node) throws org.eclipse.milo.opcua.stack.core.UaException
      Browse from node using the currently configured AddressSpace.BrowseOptions.
      Parameters:
      node - the UaNode to start the browse from.
      Returns:
      a List of UaNodes referenced by node given the currently configured AddressSpace.BrowseOptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while browsing or creating Nodes.
      See Also:
    • browseNodes

      public List<? extends UaNode> browseNodes(UaNode node, AddressSpace.BrowseOptions browseOptions) throws org.eclipse.milo.opcua.stack.core.UaException
      Browse from node using browseOptions.
      Parameters:
      node - the UaNode to start the browse from.
      browseOptions - the AddressSpace.BrowseOptions to use.
      Returns:
      a List of UaNodes referenced by node given browseOptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while browsing or creating Nodes.
    • browseNodes

      public List<? extends UaNode> browseNodes(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId) throws org.eclipse.milo.opcua.stack.core.UaException
      Browse from nodeId using the currently configured AddressSpace.BrowseOptions.
      Parameters:
      nodeId - the NodeId to start the browse from.
      Returns:
      a List of UaNodes referenced by nodeId given the currently configured AddressSpace.BrowseOptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while browsing or creating Nodes.
      See Also:
    • browseNodes

      public List<? extends UaNode> browseNodes(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, AddressSpace.BrowseOptions browseOptions) throws org.eclipse.milo.opcua.stack.core.UaException
      Browse from nodeId using browseOptions.
      Parameters:
      nodeId - the NodeId to start the browse from.
      browseOptions - the AddressSpace.BrowseOptions to use.
      Returns:
      a List of UaNodes referenced by nodeId given browseOptions.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while browsing or creating Nodes.
    • browseNodesAsync

      public CompletableFuture<List<? extends UaNode>> browseNodesAsync(UaNode node)
      Browse from node using the currently configured AddressSpace.BrowseOptions.

      This call completes asynchronously.

      Parameters:
      node - the UaNode to start the browse from.
      Returns:
      a CompletableFuture that completes successfully with a List of UaNodes referenced by node given the currently configured AddressSpace.BrowseOptions or completes exceptionally if a service-level error occurs.
      See Also:
    • browseNodesAsync

      public CompletableFuture<List<? extends UaNode>> browseNodesAsync(UaNode node, AddressSpace.BrowseOptions browseOptions)
      Browse from node using browseOptions.

      This call completes asynchronously.

      Parameters:
      node - the UaNode to start the browse from.
      browseOptions - the AddressSpace.BrowseOptions to use.
      Returns:
      a CompletableFuture that completes successfully with a List of UaNodes referenced by node given the currently configured AddressSpace.BrowseOptions or completes exceptionally if a service-level error occurs.
    • browseNodesAsync

      public CompletableFuture<List<? extends UaNode>> browseNodesAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId)
      Browse from nodeId using the currently configured AddressSpace.BrowseOptions.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId to start the browse from.
      Returns:
      a CompletableFuture that completes successfully with a List of UaNodes referenced by node given the currently configured AddressSpace.BrowseOptions or completes exceptionally if a service-level error occurs.
      See Also:
    • browseNodesAsync

      public CompletableFuture<List<? extends UaNode>> browseNodesAsync(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, AddressSpace.BrowseOptions browseOptions)
      Browse from nodeId using browseOptions.

      This call completes asynchronously.

      Parameters:
      nodeId - the NodeId to start the browse from.
      browseOptions - the AddressSpace.BrowseOptions to use.
      Returns:
      a CompletableFuture that completes successfully with a List of UaNodes referenced by node given the currently configured AddressSpace.BrowseOptions or completes exceptionally if a service-level error occurs.
    • toNodeId

      public org.eclipse.milo.opcua.stack.core.types.builtin.NodeId toNodeId(org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId xni)
      Convert xni to a NodeId in the server, reading the namespace table from the server if necessary.

      Returns NodeId.NULL_VALUE if the conversion could not be completed for any reason.

      Parameters:
      xni - the ExpandedNodeId to convert to a NodeId.
      Returns:
      a NodeId local to the server, or NodeId.NULL_VALUE if conversion could not be completed for any reason.
    • toNodeIdAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> toNodeIdAsync(org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId xni)
      Convert xni to a NodeId in the server, reading the namespace table from the server if necessary.

      Returns NodeId.NULL_VALUE if the conversion could not be completed for any reason.

      Parameters:
      xni - the ExpandedNodeId to convert to a NodeId.
      Returns:
      a NodeId local to the server, or NodeId.NULL_VALUE if conversion could not be completed for any reason.
    • getBrowseOptions

      public AddressSpace.BrowseOptions getBrowseOptions()
      Get the default AddressSpace.BrowseOptions used during browse calls that don't have an explicit AddressSpace.BrowseOptions parameter.
      Returns:
      the default AddressSpace.BrowseOptions.
    • modifyBrowseOptions

      public void modifyBrowseOptions(Consumer<AddressSpace.BrowseOptions.Builder> builderConsumer)
      Modify the default AddressSpace.BrowseOptions used during browse calls that don't have an explicit AddressSpace.BrowseOptions parameter.
      Parameters:
      builderConsumer - a Consumer that receives a AddressSpace.BrowseOptions.Builder.
    • setBrowseOptions

      public void setBrowseOptions(AddressSpace.BrowseOptions browseOptions)
      Set a new default AddressSpace.BrowseOptions used during browse calls that don't have an explicit AddressSpace.BrowseOptions parameter.
      Parameters:
      browseOptions - the new default AddressSpace.BrowseOptions.
    • getNodeCache

      public NodeCache getNodeCache()
      Get the current NodeCache.
      Returns:
      the current NodeCache.
    • setNodeCache

      public void setNodeCache(NodeCache nodeCache)
      Set a new NodeCache.
      Parameters:
      nodeCache - a new NodeCache.