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.

@FunctionalInterface public interface DataTypeManagerFactory
A factory that creates a 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:
  • 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 a DataTypeManager for the given client.
      Parameters:
      client - the OpcUaClient to create a DataTypeManager for.
      namespaceTable - the server's NamespaceTable.
      dataTypeTree - the DataTypeTree to use for type resolution.
      Returns:
      a new DataTypeManager instance.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an error occurs while creating the manager.
    • eager

      static DataTypeManagerFactory eager()
      Returns the default factory that eagerly initializes a DataTypeManager using DefaultDataTypeManager.createAndInitialize(NamespaceTable).

      The eager factory creates and initializes all codecs for known structure types in the DataTypeTree at creation time, using DynamicCodecFactory and the default initializer.

      Returns:
      the default DataTypeManagerFactory.
    • eager

      static DataTypeManagerFactory eager(CodecFactory codecFactory)
      Returns an eager factory that uses a DataTypeManagerFactory.DefaultInitializer with the provided CodecFactory.

      The eager factory creates and initializes all codecs for known structure types in the DataTypeTree at creation time.

      Parameters:
      codecFactory - the CodecFactory to use when creating codecs.
      Returns:
      a DataTypeManagerFactory that eagerly initializes types.
    • eager

      Returns an eager factory that uses the provided DataTypeManagerFactory.Initializer.

      The eager factory creates and initializes all codecs for known structure types in the DataTypeTree at creation time.

      Parameters:
      initializer - the DataTypeManagerFactory.Initializer to use for registering codecs.
      Returns:
      a DataTypeManagerFactory that eagerly initializes types.
    • lazy

      static DataTypeManagerFactory lazy()
      Returns a factory that creates a LazyClientDataTypeManager.

      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 DynamicCodecFactory by default.

      Returns:
      a DataTypeManagerFactory that creates lazy-loading managers.
    • lazy

      static DataTypeManagerFactory lazy(CodecFactory codecFactory)
      Returns a factory that creates a LazyClientDataTypeManager with a custom CodecFactory.

      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 - the CodecFactory to use when creating codecs on demand.
      Returns:
      a DataTypeManagerFactory that creates lazy-loading managers.