Package io.fluxcapacitor.javaclient.web
Class StaticFileHandler
java.lang.Object
io.fluxcapacitor.javaclient.web.StaticFileHandler
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record
protected static enum
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStaticFileHandler
(@NonNull String webRoot, Path fsBaseDirectory, URI resourceBaseUri, String fallbackFile, Set<String> immutableCandidateExtensions, long maxAgeSeconds) StaticFileHandler
(String webRoot) StaticFileHandler
(String webRoot, String resourceBasePath) StaticFileHandler
(String webRoot, String resourceBasePath, String fallbackFile) StaticFileHandler
(String webRoot, String resourceBasePath, String fallbackFile, Set<String> immutableCandidateExtensions) StaticFileHandler
(String webRoot, String resourceBasePath, String fallbackFile, Set<String> immutableCandidateExtensions, long maxAgeSeconds) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static List
<StaticFileHandler> forTargetClass
(Class<?> targetClass) static boolean
protected WebResponse
serveStaticFile
(String filePath, WebRequest request)
-
Field Details
-
classpathPrefix
- See Also:
-
filePrefix
- See Also:
-
-
Constructor Details
-
StaticFileHandler
public StaticFileHandler() -
StaticFileHandler
-
StaticFileHandler
-
StaticFileHandler
-
StaticFileHandler
-
StaticFileHandler
-
StaticFileHandler
-
-
Method Details
-
forTargetClass
-
isHandler
-
serveStaticFile
@HandleGet({"/{filePath:.+}*","","/"}) protected WebResponse serveStaticFile(String filePath, WebRequest request) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-