Class StaticContentSupport.FileBasedBuilder<T extends StaticContentSupport.FileBasedBuilder<T>>
- java.lang.Object
-
- io.helidon.webserver.staticcontent.StaticContentSupport.Builder<StaticContentSupport.FileBasedBuilder<T>>
-
- io.helidon.webserver.staticcontent.StaticContentSupport.FileBasedBuilder<T>
-
- Type Parameters:
T
- type of a subclass of a concrete builder
- All Implemented Interfaces:
Builder<StaticContentSupport>
,Supplier<StaticContentSupport>
- Direct Known Subclasses:
StaticContentSupport.ClassPathBuilder
,StaticContentSupport.FileSystemBuilder
- Enclosing interface:
- StaticContentSupport
public abstract static class StaticContentSupport.FileBasedBuilder<T extends StaticContentSupport.FileBasedBuilder<T>> extends StaticContentSupport.Builder<StaticContentSupport.FileBasedBuilder<T>>
Builder for file based static content supports, such as file based and classpath based.
-
-
Constructor Summary
Constructors Constructor Description FileBasedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
contentType(String filenameExtension, MediaType contentType)
Maps a filename extension to the response content type.-
Methods inherited from class io.helidon.webserver.staticcontent.StaticContentSupport.Builder
build, doBuild, pathMapper, welcomeFileName
-
-
-
-
Method Detail
-
contentType
public T contentType(String filenameExtension, MediaType contentType)
Maps a filename extension to the response content type. To have a system wide configuration, you can use the service loader SPIMediaTypeDetector
. This method can overrideMediaTypes
detection for static content handling only.- 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
-
-