|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UaNodeFactory
Node Factory is used to create UaNode objects dynamically. You can first register the actual implementation types for different UA NodeClasses and even for specific UA TypeDefinitionIds.
The factory is used through the createNode(org.opcfoundation.ua.core.NodeClass, org.opcfoundation.ua.builtintypes.NodeId, org.opcfoundation.ua.builtintypes.QualifiedName, org.opcfoundation.ua.builtintypes.LocalizedText) methods, which construct the objects
according to the NodeClass and TypeDefinition, using the previously registered UaNode classes.
| Method Summary | |
|---|---|
UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
Create a new Node object based on the nodeClass (or typeDefinition). |
UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
Create a new Node object based on the nodeClass (or typeDefinition). |
UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.NodeId typeDefinition)
Create a new Node object based on the nodeClass (or typeDefinition). |
UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
Create a new Node object based on the nodeClass (or typeDefinition). |
UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId)
Create a new Node object based on the nodeClass (or typeDefinition). |
UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale,
org.opcfoundation.ua.builtintypes.NodeId typeDefinitionId)
|
Class<? extends UaNode> |
getClassType(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
Return the object class corresponding to the NodeClass or Type. |
Class<? extends UaNode> |
getClassType(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId typeDefinition)
Return the object class corresponding to the NodeClass or Type. |
void |
registerNodeClass(org.opcfoundation.ua.core.NodeClass nodeClass,
Class<? extends UaNode> clazz)
Register an actual UaNode class to use when using createNode(org.opcfoundation.ua.core.NodeClass, org.opcfoundation.ua.builtintypes.NodeId, org.opcfoundation.ua.builtintypes.QualifiedName, org.opcfoundation.ua.builtintypes.LocalizedText) to create new nodes for a
OPC UA NodeClass. |
void |
registerTypeDefinition(org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
Class<? extends UaNode> clazz)
Register an actual UaNode class to use when using createNode(org.opcfoundation.ua.core.NodeClass, org.opcfoundation.ua.builtintypes.NodeId, org.opcfoundation.ua.builtintypes.QualifiedName, org.opcfoundation.ua.builtintypes.LocalizedText) to create new nodes for a
OPC UA typeDefinition. |
| Method Detail |
|---|
UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
throws UaNodeFactoryException
The method creates a new UaNode object. The class of the Node is selected depending on the nodeClass - or if typeDefinition is provided, also on that.
You can register new Node classes per nodeClass or typeDefinition using
registerNodeClass(org.opcfoundation.ua.core.NodeClass, java.lang.Class extends com.prosysopc.ua.nodes.UaNode>).
nodeClass - The UA NodeClassnodeId - The ID of the new node.browseName - The BrowseName of the new node.displayName - The DisplayName of the new node.
UaNodeFactoryException - if the class cannot be created.
UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
throws UaNodeFactoryException
The method creates a new UaNode object. The class of the Node is selected depending on the nodeClass - or if typeDefinition is provided, also on that.
You can register new Node classes per nodeClass or typeDefinition using
registerNodeClass(org.opcfoundation.ua.core.NodeClass, java.lang.Class extends com.prosysopc.ua.nodes.UaNode>).
nodeClass - The UA NodeClassnodeId - The ID of the new node.browseName - The BrowseName of the new node.displayName - The DisplayName of the new node.typeDefinition - Optional type definition to use for the class selection.
UaNodeFactoryException - if the class cannot be created.
UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.NodeId typeDefinition)
throws UaNodeFactoryException
The method creates a new UaNode object. The class of the Node is selected depending on the nodeClass - or if typeDefinition is provided, also on that.
You can register new Node classes per nodeClass or typeDefinition using
registerNodeClass(org.opcfoundation.ua.core.NodeClass, java.lang.Class extends com.prosysopc.ua.nodes.UaNode>).
nodeClass - The UA NodeClassnodeId - The ID of the new node.browseName - The BrowseName of the new node.displayName - The DisplayName of the new node.typeDefinition - Optional type definition to use for the class selection.
UaNodeFactoryException - if the class cannot be created.
UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
throws UaNodeFactoryException
The method creates a new UaNode object. The class of the Node is selected depending on the nodeClass - or if typeDefinition is provided, also on that.
You can register new Node classes per nodeClass or typeDefinition using
registerNodeClass(org.opcfoundation.ua.core.NodeClass, java.lang.Class extends com.prosysopc.ua.nodes.UaNode>).
nodeClass - The UA NodeClassnodeId - The ID of the new node.name - The name of the new node. The BrowseName and DisplayName are initialized to this.locale - The locale to use for the DisplayName.
UaNodeFactoryException - if the class cannot be created.
UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinitionId)
throws UaNodeFactoryException
The method creates a new UaNode object. The class of the Node is selected depending on the nodeClass - or if typeDefinition is provided, also on that.
You can register new Node classes per nodeClass or typeDefinition using
registerNodeClass(org.opcfoundation.ua.core.NodeClass, java.lang.Class extends com.prosysopc.ua.nodes.UaNode>).
nodeClass - The UA NodeClassnodeId - The ID of the new node.name - The name of the new node. The BrowseName and DisplayName are initialized to this.locale - The locale to use for the DisplayName.typeDefinitionId - The type definition of the node to create. If there is a specific class
registered with the type, a node object of that type is created.
UaNodeFactoryException - if the class cannot be created.
UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale,
org.opcfoundation.ua.builtintypes.NodeId typeDefinitionId)
throws UaNodeFactoryException
nodeClass - nodeId - name - locale - typeDefinitionId -
UaNodeFactoryException
Class<? extends UaNode> getClassType(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
You can create objects of this type with newInstance.
Use registerNodeClass to register custom classes.
nodeClass - UA NodeClasstypeDefinition - UA Type
Class<? extends UaNode> getClassType(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId typeDefinition)
You can create objects of this type with newInstance.
Use registerNodeClass to register custom classes.
nodeClass - UA NodeClasstypeDefinition - UA Type
void registerNodeClass(org.opcfoundation.ua.core.NodeClass nodeClass,
Class<? extends UaNode> clazz)
throws UaNodeFactoryException
createNode(org.opcfoundation.ua.core.NodeClass, org.opcfoundation.ua.builtintypes.NodeId, org.opcfoundation.ua.builtintypes.QualifiedName, org.opcfoundation.ua.builtintypes.LocalizedText) to create new nodes for a
OPC UA NodeClass.
These are registered by default
registerNodeClass(NodeClass.Object, UaObject.class); registerNodeClass(NodeClass.Variable, UaVariable.class); registerNodeClass(NodeClass.Method, UaMethod.class); registerNodeClass(NodeClass.ObjectType, UaObjectType.class); registerNodeClass(NodeClass.VariableType, UaVariableType.class); registerNodeClass(NodeClass.ReferenceType, UaReferenceType.class); registerNodeClass(NodeClass.DataType, UaDataType.class); registerNodeClass(NodeClass.View, UaView.class); registerNodeClass(Identifiers.PropertyType, UaProperty.class); registerNodeClass(Identifiers.FolderType, UaFolder.class);
nodeClass - the UA NodeClassclazz - the UaNode class to use for the nodeClass. The class must define a public
constructor with the parameters (NodeId, QualifiedName, LocalizedText).
UaNodeFactoryException - if the clazz does not contain the valid public constructor
void registerTypeDefinition(org.opcfoundation.ua.builtintypes.NodeId typeDefinition,
Class<? extends UaNode> clazz)
throws UaNodeFactoryException
createNode(org.opcfoundation.ua.core.NodeClass, org.opcfoundation.ua.builtintypes.NodeId, org.opcfoundation.ua.builtintypes.QualifiedName, org.opcfoundation.ua.builtintypes.LocalizedText) to create new nodes for a
OPC UA typeDefinition.
typeDefinition - the UA type definition, e.g. Identifiers.FolderTypeclazz - the UaNode class to use for the nodeClass. The class must define a public
constructor with the parameters (NodeId, QualifiedName, LocalizedText).
UaNodeFactoryException - if the clazz does not contain the valid public constructor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||