Interface DataTypeManagerFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
DataTypeManager for a given OpcUaClient.
Implementations can create different types of DataTypeManagers, such as:
- An eagerly initialized manager via
DefaultDataTypeManager.createAndInitialize(org.eclipse.milo.opcua.stack.core.NamespaceTable) - A lazily-loading manager via
LazyClientDataTypeManager
- See Also:
-
DefaultDataTypeManagerLazyClientDataTypeManager
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe defaultDataTypeManagerFactory.Initializerimplementation that traverses the DataType hierarchy and registers codecs for all structure types with aDataTypeManager.static interfaceAn initializer that registers codecs for custom data types with aDataTypeManager. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.milo.opcua.stack.core.types.DataTypeManagercreate(OpcUaClient client, org.eclipse.milo.opcua.stack.core.NamespaceTable namespaceTable, org.eclipse.milo.opcua.sdk.core.typetree.DataTypeTree dataTypeTree) Creates aDataTypeManagerfor the given client.static DataTypeManagerFactoryeager()Returns the default factory that eagerly initializes aDataTypeManagerusingDefaultDataTypeManager.createAndInitialize(NamespaceTable).static DataTypeManagerFactoryeager(CodecFactory codecFactory) Returns an eager factory that uses aDataTypeManagerFactory.DefaultInitializerwith the providedCodecFactory.static DataTypeManagerFactoryeager(DataTypeManagerFactory.Initializer initializer) Returns an eager factory that uses the providedDataTypeManagerFactory.Initializer.static DataTypeManagerFactorylazy()Returns a factory that creates aLazyClientDataTypeManager.static DataTypeManagerFactorylazy(CodecFactory codecFactory) Returns a factory that creates aLazyClientDataTypeManagerwith a customCodecFactory.
-
Method Details
-
create
org.eclipse.milo.opcua.stack.core.types.DataTypeManager create(OpcUaClient client, org.eclipse.milo.opcua.stack.core.NamespaceTable namespaceTable, org.eclipse.milo.opcua.sdk.core.typetree.DataTypeTree dataTypeTree) throws org.eclipse.milo.opcua.stack.core.UaException Creates aDataTypeManagerfor the given client.- Parameters:
client- theOpcUaClientto create a DataTypeManager for.namespaceTable- the server'sNamespaceTable.dataTypeTree- theDataTypeTreeto use for type resolution.- Returns:
- a new
DataTypeManagerinstance. - Throws:
org.eclipse.milo.opcua.stack.core.UaException- if an error occurs while creating the manager.
-
eager
Returns the default factory that eagerly initializes aDataTypeManagerusingDefaultDataTypeManager.createAndInitialize(NamespaceTable).The eager factory creates and initializes all codecs for known structure types in the
DataTypeTreeat creation time, usingDynamicCodecFactoryand the default initializer.- Returns:
- the default
DataTypeManagerFactory.
-
eager
Returns an eager factory that uses aDataTypeManagerFactory.DefaultInitializerwith the providedCodecFactory.The eager factory creates and initializes all codecs for known structure types in the
DataTypeTreeat creation time.- Parameters:
codecFactory- theCodecFactoryto use when creating codecs.- Returns:
- a
DataTypeManagerFactorythat eagerly initializes types.
-
eager
Returns an eager factory that uses the providedDataTypeManagerFactory.Initializer.The eager factory creates and initializes all codecs for known structure types in the
DataTypeTreeat creation time.- Parameters:
initializer- theDataTypeManagerFactory.Initializerto use for registering codecs.- Returns:
- a
DataTypeManagerFactorythat eagerly initializes types.
-
lazy
Returns a factory that creates aLazyClientDataTypeManager.The lazy factory creates a manager that resolves codecs on demand when they are first requested, rather than eagerly registering all codecs at creation time. Uses
DynamicCodecFactoryby default.- Returns:
- a
DataTypeManagerFactorythat creates lazy-loading managers.
-
lazy
Returns a factory that creates aLazyClientDataTypeManagerwith a customCodecFactory.The lazy factory creates a manager that resolves codecs on demand when they are first requested, rather than eagerly registering all codecs at creation time.
- Parameters:
codecFactory- theCodecFactoryto use when creating codecs on demand.- Returns:
- a
DataTypeManagerFactorythat creates lazy-loading managers.
-