Package io.helidon.webserver
Class StaticContentSupport.Builder
- 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 StaticContentSupport
build()
Builds newStaticContentSupport
instance.StaticContentSupport.Builder
contentType(String filenameExtension, MediaType contentType)
Maps a filename extension to the response content type.StaticContentSupport.Builder
welcomeFileName(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
-
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 isnull
IllegalArgumentException
- iffilenameExtension
is empty
-
build
public StaticContentSupport build()
Builds newStaticContentSupport
instance.- Specified by:
build
in interfaceBuilder<StaticContentSupport>
- Returns:
- a new instance
-
-