Module io.inverno.mod.base
Package io.inverno.mod.base.resource
Class AbstractResourceProvider<A extends Resource>
java.lang.Object
io.inverno.mod.base.resource.AbstractResourceProvider<A>
- Type Parameters:
A
- the type of the provided resource
- All Implemented Interfaces:
ResourceProvider<A>
public abstract class AbstractResourceProvider<A extends Resource>
extends Object
implements ResourceProvider<A>
Base implementation for ResourceProvider
.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final FileSystem
getFileSystem
(URI uri) Returns a file system for the specified URI.void
setMediaTypeService
(MediaTypeService mediaTypeService) sets the media type service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.base.resource.ResourceProvider
getResource, getResources, getSupportedSchemes
-
Field Details
-
mediaTypeService
The media type service.
-
-
Constructor Details
-
AbstractResourceProvider
public AbstractResourceProvider()
-
-
Method Details
-
setMediaTypeService
sets the media type service.
- Parameters:
mediaTypeService
- the media type service to set
-
getFileSystem
Returns a file system for the specified URI.
Returned instances are referenced counted so they can be reused when multiple threads needs to access the same file system.
- Parameters:
uri
- a URI a URI- Returns:
- a file system a file system
- Throws:
IOException
- if there was error resolving the file system
-