Class StaticContentSupport.Builder<B extends StaticContentSupport.Builder<B>>
java.lang.Object
io.helidon.webserver.staticcontent.StaticContentSupport.Builder<B>
- Type Parameters:
B
- type of a subclass of a concrete builder
- All Implemented Interfaces:
Builder<B,
,StaticContentSupport> Supplier<StaticContentSupport>
- Direct Known Subclasses:
StaticContentSupport.FileBasedBuilder
- Enclosing interface:
- StaticContentSupport
public abstract static class StaticContentSupport.Builder<B extends StaticContentSupport.Builder<B>>
extends Object
implements Builder<B,StaticContentSupport>
Fluent builder of the StaticContent detailed parameters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal StaticContentSupport
build()
Build the instance from this builder.protected abstract StaticContentSupport
doBuild()
Build the actual instance.pathMapper
(Function<String, String> resolvePathFunction) Map request path to resource path.welcomeFileName
(String welcomeFileName) Sets a name of the "file" which will be returned if directory is requested.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<B extends StaticContentSupport.Builder<B>,
StaticContentSupport> - Returns:
- instance of the built type
-
doBuild
Build the actual instance.- Returns:
- static content support
-
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
-
pathMapper
Map request path to resource path. Default uses the same path as requested. This can be used to resolve all paths to a single file, or to filter out files.- Parameters:
resolvePathFunction
- function- Returns:
- updated builder
-