Class ClasspathHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ClasspathHandlerConfig>
java.lang.Object
io.helidon.webserver.staticcontent.BaseHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.webserver.staticcontent.ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
ClasspathHandlerConfig.Builder
- Enclosing interface:
ClasspathHandlerConfig
public abstract static class ClasspathHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ClasspathHandlerConfig>
extends BaseHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
ClasspathHandlerConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.webserver.staticcontent.BaseHandlerConfig.BuilderBase
BaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass loader to use to lookup the static content resources from classpath.classLoader(ClassLoader classLoader) Class loader to use to lookup the static content resources from classpath.Clear existing value of this property.Clear existing value of this property.config()If this instance was configured, this would be the config instance used.Deprecated.Update builder from configuration (node of this type).from(ClasspathHandlerConfig prototype) Update this builder from an existing prototype instance.from(ClasspathHandlerConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.location()The location on classpath that contains the root of the static content.The location on classpath that contains the root of the static content.protected voidHandles providers and decorators.booleanClasspath content usually starts from aClasspathHandlerConfig.location()on classpath, and resolves all requested paths against this content root.singleFile(boolean singleFile) Classpath content usually starts from aClasspathHandlerConfig.location()on classpath, and resolves all requested paths against this content root.Customization of temporary storage configuration.temporaryStorage(TemporaryStorage temporaryStorage) Customization of temporary storage configuration.temporaryStorage(TemporaryStorageConfig temporaryStorageConfig) Customization of temporary storage configuration.Customization of temporary storage configuration.toString()protected voidValidates required properties.Methods inherited from class io.helidon.webserver.staticcontent.BaseHandlerConfig.BuilderBase
addCachedFile, addCachedFiles, addContentTypes, addSocket, addSockets, cachedFiles, cachedFiles, clearMemoryCache, clearRecordCacheCapacity, clearWelcome, contentTypes, contentTypes, context, context, enabled, enabled, from, from, memoryCache, memoryCache, memoryCache, memoryCache, pathMapper, pathMapper, putContentType, recordCacheCapacity, recordCacheCapacity, sockets, sockets, welcome, welcomeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig> - Overrides:
configin classBaseHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig> - Overrides:
configin classBaseHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
location
The location on classpath that contains the root of the static content. This should never be the root (i.e./), as that would allow serving of all class files.- Parameters:
location- location on classpath to serve the static content, such as"/web".- Returns:
- updated builder instance
- See Also:
-
clearTemporaryStorage
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
temporaryStorage
Customization of temporary storage configuration.- Parameters:
temporaryStorage- temporary storage config- Returns:
- updated builder instance
- See Also:
-
temporaryStorage
Customization of temporary storage configuration.- Parameters:
temporaryStorageConfig- temporary storage config- Returns:
- updated builder instance
- See Also:
-
temporaryStorage
Customization of temporary storage configuration.- Parameters:
consumer- temporary storage config- Returns:
- updated builder instance
- See Also:
-
clearClassLoader
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
classLoader
Class loader to use to lookup the static content resources from classpath.- Parameters:
classLoader- class loader to use- Returns:
- updated builder instance
- See Also:
-
singleFile
Classpath content usually starts from aClasspathHandlerConfig.location()on classpath, and resolves all requested paths against this content root. When this property is set totruewe consider thelocationto be a file, that is returned for any requested path under the configuredBaseHandlerConfigBlueprint.context().Note that when this is used, there will never be a redirect returned.
- Parameters:
singleFile- whether to considerlocationas a single file, defaults tofalse- Returns:
- updated builder instance
- See Also:
-
location
The location on classpath that contains the root of the static content. This should never be the root (i.e./), as that would allow serving of all class files.- Returns:
- the location
-
temporaryStorage
Customization of temporary storage configuration.- Returns:
- the temporary storage
-
classLoader
Class loader to use to lookup the static content resources from classpath.- Returns:
- the class loader
-
singleFile
public boolean singleFile()Classpath content usually starts from aClasspathHandlerConfig.location()on classpath, and resolves all requested paths against this content root. When this property is set totruewe consider thelocationto be a file, that is returned for any requested path under the configuredBaseHandlerConfigBlueprint.context().Note that when this is used, there will never be a redirect returned.
- Returns:
- the single file
-
config
If this instance was configured, this would be the config instance used.- Overrides:
configin classBaseHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig> - Returns:
- config node used to configure this builder, or empty if not configured
-
toString
- Overrides:
toStringin classBaseHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototypein classBaseHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classBaseHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig>
-
config(io.helidon.config.Config)