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<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<StaticContentSupport>
Fluent builder of the StaticContent detailed parameters.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StaticContentSupport
build()
Build the instance from this builder.protected abstract StaticContentSupport
doBuild()
Build the actual instance.B
pathMapper(Function<String,String> resolvePathFunction)
Map request path to resource path.B
welcomeFileName(String welcomeFileName)
Sets a name of the "file" which will be returned if directory is requested.
-
-
-
Method Detail
-
build
public final StaticContentSupport build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<B extends StaticContentSupport.Builder<B>>
- Returns:
- instance of the built type
-
doBuild
protected abstract StaticContentSupport doBuild()
Build the actual instance.- Returns:
- static content support
-
welcomeFileName
public B 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
-
pathMapper
public B pathMapper(Function<String,String> resolvePathFunction)
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
-
-