Class ClasspathHandlerConfig.BuilderBase.ClasspathHandlerConfigImpl
java.lang.Object
io.helidon.webserver.staticcontent.BaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl
io.helidon.webserver.staticcontent.ClasspathHandlerConfig.BuilderBase.ClasspathHandlerConfigImpl
- All Implemented Interfaces:
Prototype.Api, BaseHandlerConfig, ClasspathHandlerConfig
- Enclosing class:
ClasspathHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig>
protected static class ClasspathHandlerConfig.BuilderBase.ClasspathHandlerConfigImpl
extends BaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl
implements ClasspathHandlerConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface BaseHandlerConfig
BaseHandlerConfig.Builder, BaseHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forBaseHandlerConfig.static classBaseHandlerConfig.BuilderBase<BUILDER extends BaseHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends BaseHandlerConfig>Fluent API builder base forBaseHandlerConfig.Nested classes/interfaces inherited from interface ClasspathHandlerConfig
ClasspathHandlerConfig.Builder, ClasspathHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forClasspathHandlerConfig.static classClasspathHandlerConfig.BuilderBase<BUILDER extends ClasspathHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends ClasspathHandlerConfig>Fluent API builder base forClasspathHandlerConfig. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClasspathHandlerConfigImpl(ClasspathHandlerConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionClass loader to use to lookup the static content resources from classpath.booleaninthashCode()location()The location on classpath that contains the root of the static content.Whether sidecar resources may be sourced from a different classpath origin than the logical resource; when not configured, feature-registered handlers inherit the feature-level value and direct services default tofalse.booleanClasspath content usually starts from aClasspathHandlerConfig.location()on classpath, and resolves all requested paths against this content root.Customization of temporary storage configuration.toString()Methods inherited from class BaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl
cachedFiles, contentTypes, context, enabled, memoryCache, pathMapper, preCompressedEnabled, preCompressedEncodings, recordCacheCapacity, sockets, welcomeModifier and TypeMethodDescriptionA set of files that are cached in memory at startup.Maps a filename extension to the response content type.context()Context that will serve this handler's static resources, defaults to/.booleanenabled()Whether this handle is enabled, defaults totrue.Handles will use memory cache configured onStaticContentConfig.memoryCache()by default.Map request path to resource path.Whether pre-compressed sidecar resources should be selected for this handler; feature-registered handlers inherit the feature value when absent, directly created handlers default to disabled, and file system handlers configured with a single file always require handler-level opt-in.Pre-compressed content coding to file suffix mappings; handler mappings replace inherited feature-level mappings rather than merging with them, an explicit empty map disables sidecar lookups for this handler, codings must be unique concrete valid HTTP tokens other thanidentityand*, and suffixes have leading dots ignored and must not contain path separators.Configures the capacity of the cache used for resource metadata.sockets()Sockets names (listeners) that will host this static content handler, defaults to all configured sockets.welcome()Welcome-file name.
-
Constructor Details
-
ClasspathHandlerConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
location
Description copied from interface:ClasspathHandlerConfigThe 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.- Specified by:
locationin interfaceClasspathHandlerConfig- Returns:
- location on classpath to serve the static content, such as
"/web".
-
temporaryStorage
Description copied from interface:ClasspathHandlerConfigCustomization of temporary storage configuration.- Specified by:
temporaryStoragein interfaceClasspathHandlerConfig- Returns:
- temporary storage config
-
classLoader
Description copied from interface:ClasspathHandlerConfigClass loader to use to lookup the static content resources from classpath.- Specified by:
classLoaderin interfaceClasspathHandlerConfig- Returns:
- class loader to use
-
preCompressedCrossOriginSourcingEnabled
Description copied from interface:ClasspathHandlerConfigWhether sidecar resources may be sourced from a different classpath origin than the logical resource; when not configured, feature-registered handlers inherit the feature-level value and direct services default tofalse.- Specified by:
preCompressedCrossOriginSourcingEnabledin interfaceClasspathHandlerConfig- Returns:
- whether cross-origin classpath sidecar sourcing is explicitly enabled or disabled
-
singleFile
public boolean singleFile()Description copied from interface:ClasspathHandlerConfigClasspath 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.
- Specified by:
singleFilein interfaceClasspathHandlerConfig- Returns:
- whether to consider
locationas a single file, defaults tofalse
-
toString
- Overrides:
toStringin classBaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl
-
equals
- Overrides:
equalsin classBaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseHandlerConfig.BuilderBase.BaseHandlerConfigImpl
-