Class FileServiceConfig

java.lang.Object
com.linecorp.armeria.server.file.FileServiceConfig

public final class FileServiceConfig extends Object
FileService configuration.
  • Method Details

    • vfs

      public HttpVfs vfs()
      Returns the HttpVfs that provides the static files to an FileService.
    • clock

      public Clock clock()
      Returns the Clock the provides the current date and time to an FileService.
    • entryCacheSpec

      @Nullable public @Nullable String entryCacheSpec()
      Returns the cache spec of the file entry cache, as defined in CaffeineSpec.
    • maxCacheEntrySizeBytes

      public int maxCacheEntrySizeBytes()
      Returns the maximum allowed size of a cached file entry. Files bigger than this value will not be cached.
    • serveCompressedFiles

      public boolean serveCompressedFiles()
      Returns whether pre-compressed files should be served.
    • autoDecompress

      public boolean autoDecompress()
      Returns whether pre-compressed files should be automatically decompressed if there is no HttpHeaderNames.ACCEPT_ENCODING corresponding to the compressed file.
    • autoIndex

      public boolean autoIndex()
      Returns whether a directory listing for a directory without an index.html file will be auto-generated.
    • headers

      public HttpHeaders headers()
      Returns the additional HttpHeaders to send in a response.
    • mediaTypeResolver

      public MediaTypeResolver mediaTypeResolver()
      Returns the MediaTypeResolver used for resolving the MediaType of a file.
    • toString

      public String toString()
      Overrides:
      toString in class Object