Interface IdentityProvider

All Known Implementing Classes:
UuidFactory

public interface IdentityProvider
Strategy interface for generating unique identifiers used throughout the Fluxzero Runtime.

An IdentityProvider produces identifiers for messages, schedules, user sessions, documents, and other entities that require uniqueness.

The interface defines two types of identifiers:

  • idForName() – the main ID used in application-level constructs
  • nextTechnicalId() – defaults to nextFunctionalId(), but may be overridden for traceability

Implementations can be discovered automatically using ServiceLoader. If none are found, UuidFactory is used by default.

Example Usage

String id = IdentityProvider.defaultIdentityProvider.nextFunctionalId();
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IdentityProvider
    The default identity provider, resolved using ServiceLoader, or falling back to UuidFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a new functional ID, suitable for user-visible or application-level tracking.
    Returns a new functional ID derived from the given name.
    default String
    Returns a new technical ID, suitable for lower-level operations such as internal tracing.
  • Field Details

  • Method Details

    • idForName

      String idForName()
      Returns a new functional ID, suitable for user-visible or application-level tracking.
      Returns:
      a unique, non-null identifier string
    • idForName

      String idForName(String name)
      Returns a new functional ID derived from the given name.

      For a given name, this method should always return the same identifier.

      Parameters:
      name - the name to derive the identifier from
      Returns:
      a unique, non-null identifier string
    • nextTechnicalId

      default String nextTechnicalId()
      Returns a new technical ID, suitable for lower-level operations such as internal tracing.

      Defaults to idForName(), but can be overridden.

      Returns:
      a unique identifier string