Interface IdentityProvider
- All Superinterfaces:
IdentityProviderDefaults
- All Known Implementing Classes:
UuidFactory
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:
nextFunctionalId()– the main ID used in application-level constructsnextTechnicalId()– defaults tonextFunctionalId(), 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 inherited from interface IdentityProviderDefaults
defaultIdentityProvider -
Method Summary
Modifier and TypeMethodDescriptionReturns a new functional ID derived from the given name.Returns a new functional ID, suitable for user-visible or application-level tracking.default StringReturns a new technical ID, suitable for lower-level operations such as internal tracing.
-
Method Details
-
nextFunctionalId
String nextFunctionalId()Returns a new functional ID, suitable for user-visible or application-level tracking.- Returns:
- a unique, non-null identifier string
-
idForName
-
nextTechnicalId
Returns a new technical ID, suitable for lower-level operations such as internal tracing.Defaults to
nextFunctionalId(), but can be overridden.- Returns:
- a unique identifier string
-