Class AbstractHttpVfs

java.lang.Object
com.linecorp.armeria.server.file.AbstractHttpVfs
All Implemented Interfaces:
HttpVfs
Direct Known Subclasses:
AbstractBlockingHttpVfs

public abstract class AbstractHttpVfs extends Object implements HttpVfs
A skeletal HttpVfs implementation.
  • Constructor Details

    • AbstractHttpVfs

      public AbstractHttpVfs()
  • Method Details

    • canList

      public CompletableFuture<Boolean> canList(Executor fileReadExecutor, String path)
      Description copied from interface: HttpVfs
      Returns whether the file at the specified path is a listable directory.
      Specified by:
      canList in interface HttpVfs
      Parameters:
      fileReadExecutor - the Executor which will perform the read operations against the file
      path - an absolute path that starts with '/', whose component separator is '/'
      Returns:
      the CompletableFuture that will be completed with true if the file is a listable directory. It will be completed with false if the directory does not exist or the file listing is not available.
    • list

      public CompletableFuture<List<String>> list(Executor fileReadExecutor, String path)
      Description copied from interface: HttpVfs
      Lists the files at the specified directory path non-recursively.
      Specified by:
      list in interface HttpVfs
      Parameters:
      fileReadExecutor - the Executor which will perform the read operations against the file
      path - an absolute path that starts with '/', whose component separator is '/'
      Returns:
      the CompletableFuture that will be completed with the list of the file names. If the file is a directory, the file name will end with '/'. If the directory does not exist or the file listing is not available, it will be completed with an empty List.
    • toString

      public String toString()
      Returns the HttpVfs.meterTag() of this HttpVfs.
      Overrides:
      toString in class Object