Module io.jstach.ezkv.kvs
Package io.jstach.ezkv.kvs
Interface KeyValuesServiceProvider.KeyValuesLoaderFinder
- All Superinterfaces:
KeyValuesServiceProvider
- Enclosing interface:
KeyValuesServiceProvider
public static non-sealed interface KeyValuesServiceProvider.KeyValuesLoaderFinder
extends KeyValuesServiceProvider
A service provider interface for finding
KeyValuesLoader
implementations
that can handle specific KeyValuesResource
instances.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A context provided toKeyValuesServiceProvider.KeyValuesLoaderFinder
implementations to supply necessary dependencies and services for creating aKeyValuesLoader
.Nested classes/interfaces inherited from interface io.jstach.ezkv.kvs.KeyValuesServiceProvider
KeyValuesServiceProvider.KeyValuesFilter, KeyValuesServiceProvider.KeyValuesLoaderFinder, KeyValuesServiceProvider.KeyValuesMediaFinder, KeyValuesServiceProvider.KeyValuesProvider
-
Field Summary
Fields inherited from interface io.jstach.ezkv.kvs.KeyValuesServiceProvider
BUILTIN_ORDER_START
-
Method Summary
Modifier and TypeMethodDescriptionOptional
<? extends KeyValuesLoader> findLoader
(KeyValuesServiceProvider.KeyValuesLoaderFinder.LoaderContext context, KeyValuesResource resource) Finds aKeyValuesLoader
capable of loading the specifiedKeyValuesResource
using the providedKeyValuesServiceProvider.KeyValuesLoaderFinder.LoaderContext
.Methods inherited from interface io.jstach.ezkv.kvs.KeyValuesServiceProvider
order
-
Method Details
-
findLoader
Optional<? extends KeyValuesLoader> findLoader(KeyValuesServiceProvider.KeyValuesLoaderFinder.LoaderContext context, KeyValuesResource resource) Finds aKeyValuesLoader
capable of loading the specifiedKeyValuesResource
using the providedKeyValuesServiceProvider.KeyValuesLoaderFinder.LoaderContext
. If the resource cannot be found the returnedKeyValuesLoader
should throw aFileNotFoundException
orNoSuchFileException
to indicate not found and not Optional.empty which conversely means no matching loader could be found based on the resource.- Parameters:
context
- the context containing dependencies and servicesresource
- the resource for which a loader is sought- Returns:
- an
Optional
containing the loader if found, or empty if not - See Also:
-