java.lang.Object
io.helidon.webserver.StaticContentSupport.Builder
- All Implemented Interfaces:
Builder<StaticContentSupport.Builder,,StaticContentSupport> Supplier<StaticContentSupport>
- Enclosing class:
- StaticContentSupport
public static class StaticContentSupport.Builder
extends Object
implements Builder<StaticContentSupport.Builder,StaticContentSupport>
Fluent builder of the StaticContent detailed parameters.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds newStaticContentSupportinstance.contentType(String filenameExtension, MediaType contentType) Maps a filename extension to the response content type.Sets custom temporary folder for extracting static content from a jar.welcomeFileName(String welcomeFileName) Sets a name of the "file" which will be returned if directory is requested.
-
Method Details
-
welcomeFileName
Sets a name of the "file" which will be returned if directory is requested.- Parameters:
welcomeFileName- a name of the welcome file- Returns:
- updated builder
-
tmpDir
Sets custom temporary folder for extracting static content from a jar.- Parameters:
tmpDir- custom temporary folder- Returns:
- updated builder
-
contentType
Maps a filename extension to the response content type.- Parameters:
filenameExtension- a filename extension. The part after the last {code dot '.'} in the name.contentType- a mapped content type- Returns:
- updated builder
- Throws:
NullPointerException- if any parameter isnullIllegalArgumentException- iffilenameExtensionis empty
-
build
Builds newStaticContentSupportinstance.- Specified by:
buildin interfaceBuilder<StaticContentSupport.Builder,StaticContentSupport> - Returns:
- a new instance
-