- java.lang.Object
-
- io.helidon.webserver.StaticContentSupport.Builder
-
- All Implemented Interfaces:
Builder<StaticContentSupport>,Supplier<StaticContentSupport>
- Enclosing class:
- StaticContentSupport
public static class StaticContentSupport.Builder extends Object implements Builder<StaticContentSupport>
Fluent builder of the StaticContent detailed parameters.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticContentSupportbuild()Builds newStaticContentSupportinstance.StaticContentSupport.BuildercontentType(String filenameExtension, MediaType contentType)Maps a filename extension to the response content type.StaticContentSupport.BuildertmpDir(Path tmpDir)Sets custom temporary folder for extracting static content from a jar.StaticContentSupport.BuilderwelcomeFileName(String welcomeFileName)Sets a name of the "file" which will be returned if directory is requested.
-
-
-
Method Detail
-
welcomeFileName
public StaticContentSupport.Builder welcomeFileName(String 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
public StaticContentSupport.Builder tmpDir(Path tmpDir)
Sets custom temporary folder for extracting static content from a jar.- Parameters:
tmpDir- custom temporary folder- Returns:
- updated builder
-
contentType
public StaticContentSupport.Builder contentType(String filenameExtension, MediaType 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
public StaticContentSupport build()
Builds newStaticContentSupportinstance.- Specified by:
buildin interfaceBuilder<StaticContentSupport>- Returns:
- a new instance
-
-