Class StaticContentService.Builder<B extends StaticContentService.Builder<B>>
java.lang.Object
io.helidon.webserver.staticcontent.StaticContentService.Builder<B>
- Type Parameters:
B
- type of a subclass of a concrete builder
- All Implemented Interfaces:
Builder<B,
,StaticContentService> Supplier<StaticContentService>
- Direct Known Subclasses:
StaticContentService.FileBasedBuilder
- Enclosing interface:
StaticContentService
@Deprecated(forRemoval=true,
since="4.1.5")
public abstract static class StaticContentService.Builder<B extends StaticContentService.Builder<B>>
extends Object
implements Builder<B,StaticContentService>
Deprecated, for removal: This API element is subject to removal in a future version.
Fluent builder of the StaticContent detailed parameters.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Builder()
Deprecated, for removal: This API element is subject to removal in a future version.Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionaddCacheInMemory
(String path) Deprecated, for removal: This API element is subject to removal in a future version.Add a path (as requested by the user) that should be cached in memory.final StaticContentService
build()
Deprecated, for removal: This API element is subject to removal in a future version.Build the instance from this builder.protected abstract StaticContentService
doBuild()
Deprecated, for removal: This API element is subject to removal in a future version.Build the actual instance.pathMapper
(Function<String, String> resolvePathFunction) Deprecated, for removal: This API element is subject to removal in a future version.Map request path to resource path.recordCacheCapacity
(int capacity) Deprecated, for removal: This API element is subject to removal in a future version.Configure capacity of cache used for resources.welcomeFileName
(String welcomeFileName) Deprecated, for removal: This API element is subject to removal in a future version.Sets a name of the "file" which will be returned if directory is requested.
-
Constructor Details
-
Builder
protected Builder()Deprecated, for removal: This API element is subject to removal in a future version.Default constructor.
-
-
Method Details
-
build
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<B extends StaticContentService.Builder<B>,
StaticContentService> - Returns:
- instance of the built type
-
welcomeFileName
Deprecated, for removal: This API element is subject to removal in a future version.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
Deprecated, for removal: This API element is subject to removal in a future version.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
-
addCacheInMemory
Deprecated, for removal: This API element is subject to removal in a future version.Add a path (as requested by the user) that should be cached in memory. The resource will be loaded into memory (as bytes) on server startup and served from memory, instead of accessing the resource each time. For classpath, each file must be explicitly specified (as we do not scan classpath), for file based this can also include directories. Helidon does not validate amount of memory used, be careful to have enough heap memory to cache the configured files.Files cached in memory will never be re-loaded, even if changed, until server restart!
For classpath resource served from
web/index.html
, thepath
should be configured toindex.html
when the classpath root is set toweb
.- Parameters:
path
- path to cache in memory- Returns:
- updated builder
-
recordCacheCapacity
Deprecated, for removal: This API element is subject to removal in a future version.Configure capacity of cache used for resources. This cache will make sure the media type and location is discovered faster.- Parameters:
capacity
- maximal number of cached records, only caches media type and Path, not the content- Returns:
- updated builder
-
doBuild
Deprecated, for removal: This API element is subject to removal in a future version.Build the actual instance.- Returns:
- static content support
-
FileSystemHandlerConfig
andClasspathHandlerConfig