Interface StaticFiles.LastModifiedResolver
- Enclosing class:
StaticFiles
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionlastModifiedFor(@NonNull Path path, @NonNull BasicFileAttributes attributes) Resolves theLast-Modifiedvalue for the file being served.
-
Method Details
-
fromAttributes
-
disabledInstance
-
lastModifiedFor
@NonNull Optional<Instant> lastModifiedFor(@NonNull Path path, @NonNull BasicFileAttributes attributes) Resolves theLast-Modifiedvalue for the file being served.Implementations must be thread-safe;
StaticFilesinvokes resolvers concurrently from request-handling threads.- Parameters:
path- the resolved file path being servedattributes- the file attributes read for this response- Returns:
- the last-modified instant to emit, or
Optional.empty()to omit it
-