Package com.linecorp.armeria.server.file
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 Summary
Constructors Constructor Description AbstractHttpVfs()
-
Method Summary
Modifier and Type Method Description CompletableFuture<Boolean>
canList(Executor fileReadExecutor, String path)
Returns whether the file at the specifiedpath
is a listable directory.CompletableFuture<List<String>>
list(Executor fileReadExecutor, String path)
Lists the files at the specified directorypath
non-recursively.String
toString()
Returns theHttpVfs.meterTag()
of thisHttpVfs
.
-
Constructor Details
-
AbstractHttpVfs
public AbstractHttpVfs()
-
-
Method Details
-
canList
Description copied from interface:HttpVfs
Returns whether the file at the specifiedpath
is a listable directory.- Specified by:
canList
in interfaceHttpVfs
- Parameters:
fileReadExecutor
- theExecutor
which will perform the read operations against the filepath
- an absolute path that starts with'/'
, whose component separator is'/'
- Returns:
- the
CompletableFuture
that will be completed withtrue
if the file is a listable directory. It will be completed withfalse
if the directory does not exist or the file listing is not available.
-
list
Description copied from interface:HttpVfs
Lists the files at the specified directorypath
non-recursively.- Specified by:
list
in interfaceHttpVfs
- Parameters:
fileReadExecutor
- theExecutor
which will perform the read operations against the filepath
- 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 emptyList
.
-
toString
Returns theHttpVfs.meterTag()
of thisHttpVfs
.
-