Interface ClasspathHandlerConfig
- All Superinterfaces:
BaseHandlerConfig
,Prototype.Api
- All Known Implementing Classes:
ClasspathHandlerConfig.BuilderBase.ClasspathHandlerConfigImpl
Classpath based static content handler configuration.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forClasspathHandlerConfig
.static class
ClasspathHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig> Fluent API builder base forClasspathHandlerConfig
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to customize configuration.builder
(ClasspathHandlerConfig instance) Create a new fluent API builder from an existing instance.Class loader to use to lookup the static content resources from classpath.static ClasspathHandlerConfig
create()
Create a new instance with default values.static ClasspathHandlerConfig
Deprecated.static ClasspathHandlerConfig
Create a new instance from configuration.static ClasspathHandlerConfig
Create a new classpath based static content configuration from the defined location.location()
The location on classpath that contains the root of the static content.boolean
Classpath content usually starts from alocation()
on classpath, and resolves all requested paths against this content root.Customization of temporary storage configuration.Methods inherited from interface io.helidon.webserver.staticcontent.BaseHandlerConfig
cachedFiles, contentTypes, context, enabled, memoryCache, pathMapper, recordCacheCapacity, sockets, welcome
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
create
Create a new classpath based static content configuration from the defined location. All other configuration is default.- Parameters:
location
- location on classpath- Returns:
- a new configuration for classpath static content handler
-
location
String 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:
- location on classpath to serve the static content, such as
"/web"
.
-
temporaryStorage
Optional<TemporaryStorage> temporaryStorage()Customization of temporary storage configuration.- Returns:
- temporary storage config
-
classLoader
Optional<ClassLoader> classLoader()Class loader to use to lookup the static content resources from classpath.- Returns:
- class loader to use
-
singleFile
boolean singleFile()Classpath content usually starts from alocation()
on classpath, and resolves all requested paths against this content root. When this property is set totrue
we consider thelocation
to 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:
- whether to consider
location
as a single file, defaults tofalse
-
create(io.helidon.config.Config)