Class AbstractObjectStorageResourceLoader
java.lang.Object
io.micronaut.objectstorage.resource.AbstractObjectStorageResourceLoader
- All Implemented Interfaces:
io.micronaut.core.io.ResourceLoader
- Direct Known Subclasses:
NamedObjectStorageResourceLoader
@Internal
public abstract class AbstractObjectStorageResourceLoader
extends Object
implements io.micronaut.core.io.ResourceLoader
Shared
ResourceLoader support for object storage-backed resources.- Since:
- 3.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRelative loader state forforBase(String).static final recordResolved object storage resource. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractObjectStorageResourceLoader(@Nullable AbstractObjectStorageResourceLoader.RelativeBase relativeBase) -
Method Summary
Modifier and TypeMethodDescriptionprotected final booleanexists(@NonNull AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource resolved) io.micronaut.core.io.ResourceLoadergetResource(String path) getResourceAsStream(String path) getResources(String path) protected abstract booleanhasRecognizedPrefix(@NonNull String path) protected final Optional<InputStream> openStream(@NonNull AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource resolved) protected abstract Optional<AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource> resolveAbsolute(@NonNull String path) resolveRelative(@NonNull String path) resolveResource(@NonNull String path) protected final Optional<ObjectStorageEntry<?>> retrieveEntry(@NonNull AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource resolved) booleansupportsPrefix(String path) protected abstract AbstractObjectStorageResourceLoaderwithRelativeBase(@NonNull AbstractObjectStorageResourceLoader.RelativeBase relativeBase) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.io.ResourceLoader
reportResourceDuplicates
-
Constructor Details
-
AbstractObjectStorageResourceLoader
protected AbstractObjectStorageResourceLoader() -
AbstractObjectStorageResourceLoader
protected AbstractObjectStorageResourceLoader(@Nullable AbstractObjectStorageResourceLoader.RelativeBase relativeBase)
-
-
Method Details
-
getResourceAsStream
- Specified by:
getResourceAsStreamin interfaceio.micronaut.core.io.ResourceLoader
-
getResource
-
getResources
-
supportsPrefix
- Specified by:
supportsPrefixin interfaceio.micronaut.core.io.ResourceLoader
-
forBase
- Specified by:
forBasein interfaceio.micronaut.core.io.ResourceLoader
-
hasRecognizedPrefix
-
resolveAbsolute
protected abstract Optional<AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource> resolveAbsolute(@NonNull String path) -
withRelativeBase
protected abstract AbstractObjectStorageResourceLoader withRelativeBase(@NonNull AbstractObjectStorageResourceLoader.RelativeBase relativeBase) -
resolveResource
protected final Optional<AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource> resolveResource(@NonNull String path) -
resolveRelative
protected final Optional<AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource> resolveRelative(@NonNull String path) -
openStream
protected final Optional<InputStream> openStream(@NonNull AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource resolved) -
exists
protected final boolean exists(@NonNull AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource resolved) -
retrieveEntry
protected final Optional<ObjectStorageEntry<?>> retrieveEntry(@NonNull AbstractObjectStorageResourceLoader.ResolvedObjectStorageResource resolved)
-