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 Details

    • mediaTypeService

      protected MediaTypeService mediaTypeService
      The media type service.
  • Constructor Details

    • AbstractResourceProvider

      public AbstractResourceProvider()
  • Method Details

    • setMediaTypeService

      public void setMediaTypeService(MediaTypeService mediaTypeService)

      sets the media type service.

      Parameters:
      mediaTypeService - the media type service to set
    • getFileSystem

      protected final FileSystem getFileSystem(URI uri) throws IOException

      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