Class StaticContentService.FileBasedBuilder<T extends StaticContentService.FileBasedBuilder<T>>
java.lang.Object
io.helidon.webserver.staticcontent.StaticContentService.Builder<StaticContentService.FileBasedBuilder<T>>
io.helidon.webserver.staticcontent.StaticContentService.FileBasedBuilder<T>
- Type Parameters:
- T- type of a subclass of a concrete builder
- All Implemented Interfaces:
- Builder<StaticContentService.FileBasedBuilder<T>,,- StaticContentService> - Supplier<StaticContentService>
- Direct Known Subclasses:
- StaticContentService.ClassPathBuilder,- StaticContentService.FileSystemBuilder
- Enclosing interface:
- StaticContentService
public abstract static class StaticContentService.FileBasedBuilder<T extends StaticContentService.FileBasedBuilder<T>>
extends StaticContentService.Builder<StaticContentService.FileBasedBuilder<T>>
Builder for file based static content supports, such as file based and classpath based.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncontentType(String filenameExtension, MediaType contentType) Maps a filename extension to the response content type.Methods inherited from class io.helidon.webserver.staticcontent.StaticContentService.BuilderaddCacheInMemory, build, doBuild, pathMapper, recordCacheCapacity, welcomeFileName
- 
Constructor Details- 
FileBasedBuilderprotected FileBasedBuilder()Default constructor.
 
- 
- 
Method Details- 
contentTypeMaps a filename extension to the response content type. To have a system wide configuration, you can use the service loader SPIMediaTypeDetector. This method can overrideMediaTypesdetection 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 is- null
- IllegalArgumentException- if- filenameExtensionis empty
 
 
-