Class StaticContentConfig.Builder
java.lang.Object
io.helidon.webserver.staticcontent.StaticContentConfig.BuilderBase<StaticContentConfig.Builder, StaticContentConfig>
io.helidon.webserver.staticcontent.StaticContentConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<StaticContentConfig.Builder, StaticContentConfig>, Builder<StaticContentConfig.Builder, StaticContentFeature>, ConfigBuilderSupport.ConfiguredBuilder<StaticContentConfig.Builder, StaticContentConfig>, Supplier<StaticContentFeature>
- Enclosing interface:
StaticContentConfig
public static class StaticContentConfig.Builder
extends StaticContentConfig.BuilderBase<StaticContentConfig.Builder, StaticContentConfig>
implements Builder<StaticContentConfig.Builder, StaticContentFeature>
Fluent API builder for
StaticContentFeature.-
Nested Class Summary
Nested classes/interfaces inherited from class StaticContentConfig.BuilderBase
StaticContentConfig.BuilderBase.StaticContentConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class StaticContentConfig.BuilderBase
addClasspath, addClasspath, addClasspath, addContentTypes, addPath, addPath, addPath, addPreCompressedEncodings, addSocket, addSockets, classpath, classpath, clearClasspath, clearMemoryCache, clearPath, clearSockets, clearTemporaryStorage, clearWelcome, config, config, contentTypes, contentTypes, enabled, enabled, from, from, memoryCache, memoryCache, memoryCache, memoryCache, name, name, path, path, preBuildPrototype, preCompressedCrossOriginSourcingEnabled, preCompressedCrossOriginSourcingEnabled, preCompressedEnabled, preCompressedEnabled, preCompressedEncodings, preCompressedEncodings, putContentType, putPreCompressedEncoding, sockets, sockets, temporaryStorage, temporaryStorage, temporaryStorage, temporaryStorage, toString, validatePrototype, weight, weight, welcome, welcomeModifier and TypeMethodDescriptionaddClasspath(ClasspathHandlerConfig classpath) List of classpath based static content handlers.addClasspath(Consumer<ClasspathHandlerConfig.Builder> consumer) List of classpath based static content handlers.addClasspath(List<? extends ClasspathHandlerConfig> classpath) List of classpath based static content handlers.addContentTypes(Map<String, ? extends MediaType> contentTypes) Maps a filename extension to the response content type.List of file system based static content handlers.addPath(Consumer<FileSystemHandlerConfig.Builder> consumer) List of file system based static content handlers.addPath(List<? extends FileSystemHandlerConfig> path) List of file system based static content handlers.addPreCompressedEncodings(Map<String, String> preCompressedEncodings) Pre-compressed content coding to file suffix mappings; defaults include br to br and gzip to gz, handler-level mappings replace these mappings rather than merging with them, an explicit empty map disables sidecar lookups by default, codings must be unique concrete valid HTTP tokens other thanidentityand*, and suffixes have leading dots ignored and must not contain path separators.Sockets names (listeners) that will host static content handlers, defaults to all configured sockets.addSockets(Set<String> sockets) Sockets names (listeners) that will host static content handlers, defaults to all configured sockets.List of classpath based static content handlers.classpath(List<? extends ClasspathHandlerConfig> classpath) List of classpath based static content handlers.Clear all classpath.Clear existing value of memoryCache.Clear all path.Clear all sockets.Clear existing value of temporaryStorage.Clear existing value of welcome.config()Configuration used to configure this instance.Update builder from configuration (node of this type).Maps a filename extension to the response content type.contentTypes(Map<String, ? extends MediaType> contentTypes) Maps a filename extension to the response content type.booleanenabled()Whether this feature is enabled, defaults totrue.enabled(boolean enabled) Whether this feature is enabled, defaults totrue.from(StaticContentConfig prototype) Update this builder from an existing prototype instance.from(StaticContentConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Memory cache shared by the whole feature.memoryCache(MemoryCache memoryCache) Memory cache shared by the whole feature.memoryCache(MemoryCacheConfig memoryCache) Memory cache shared by the whole feature.memoryCache(Consumer<MemoryCacheConfig.Builder> consumer) Memory cache shared by the whole feature.name()Name of this instance.Name of this instance.path()List of file system based static content handlers.path(List<? extends FileSystemHandlerConfig> path) List of file system based static content handlers.protected voidHandles providers and decorators.booleanWhether classpath sidecar resources may be sourced from a different classpath origin than the logical resource by default for feature-registered handlers.preCompressedCrossOriginSourcingEnabled(boolean preCompressedCrossOriginSourcingEnabled) Whether classpath sidecar resources may be sourced from a different classpath origin than the logical resource by default for feature-registered handlers.booleanWhether pre-compressed sidecar resources should be selected by default for feature-registered directory and classpath handlers; this is disabled by default and does not apply to file system handlers configured with a single file, which require handler-level opt-in.preCompressedEnabled(boolean preCompressedEnabled) Whether pre-compressed sidecar resources should be selected by default for feature-registered directory and classpath handlers; this is disabled by default and does not apply to file system handlers configured with a single file, which require handler-level opt-in.Pre-compressed content coding to file suffix mappings; defaults include br to br and gzip to gz, handler-level mappings replace these mappings rather than merging with them, an explicit empty map disables sidecar lookups by default, codings must be unique concrete valid HTTP tokens other thanidentityand*, and suffixes have leading dots ignored and must not contain path separators.preCompressedEncodings(Map<String, String> preCompressedEncodings) Pre-compressed content coding to file suffix mappings; defaults include br to br and gzip to gz, handler-level mappings replace these mappings rather than merging with them, an explicit empty map disables sidecar lookups by default, codings must be unique concrete valid HTTP tokens other thanidentityand*, and suffixes have leading dots ignored and must not contain path separators.putContentType(String key, MediaType contentType) Maps a filename extension to the response content type.putPreCompressedEncoding(String key, String preCompressedEncoding) Pre-compressed content coding to file suffix mappings; defaults include br to br and gzip to gz, handler-level mappings replace these mappings rather than merging with them, an explicit empty map disables sidecar lookups by default, codings must be unique concrete valid HTTP tokens other thanidentityand*, and suffixes have leading dots ignored and must not contain path separators.sockets()Sockets names (listeners) that will host static content handlers, defaults to all configured sockets.Sockets names (listeners) that will host static content handlers, defaults to all configured sockets.Temporary storage to use across all classpath handlers.temporaryStorage(TemporaryStorage temporaryStorage) Temporary storage to use across all classpath handlers.temporaryStorage(TemporaryStorageConfig temporaryStorage) Temporary storage to use across all classpath handlers.Temporary storage to use across all classpath handlers.toString()protected voidValidates required properties.doubleweight()Weight of the static content feature.weight(double weight) Weight of the static content feature.welcome()Welcome-file name.Welcome-file name.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault StaticContentFeatureget()default StaticContentConfig.Builderidentity()Instance of this builder as the correct type.default StaticContentConfig.Builderupdate(Consumer<StaticContentConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault StaticContentConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<StaticContentConfig.Builder, StaticContentConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<StaticContentConfig.Builder, StaticContentFeature>- Returns:
- instance of the built type
-