SimpleServiceProvider
Simple implementation of ServiceProvider using thread-safe ConcurrentHashMap for storage. Provides basic service registration and retrieval functionality with support for both type-based and name-based lookups. Supports subtype matching for type-based lookups.
This implementation is suitable for most use cases requiring a lightweight, thread-safe service provider.
Properties
Functions
Creates a shallow copy of this service provider. The copy contains references to the same service instances but in separate maps.
Copies all registered services from this provider to the target provider. Iterates through all named services and registers them with the target provider.
Retrieves a service by its registered name. Performs a direct lookup in the named services map.
Retrieves a service by its Kotlin type. First tries exact type match, then falls back to subtype matching if no exact match is found.