Interface FileSystemHandlerConfig
- All Superinterfaces:
BaseHandlerConfig, Prototype.Api
- All Known Implementing Classes:
FileSystemHandlerConfig.BuilderBase.FileSystemHandlerConfigImpl
File system based static content handler configuration.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forFileSystemHandlerConfig.static classFileSystemHandlerConfig.BuilderBase<BUILDER extends FileSystemHandlerConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FileSystemHandlerConfig>Fluent API builder base forFileSystemHandlerConfig. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a new fluent API builder to customize configuration.builder(FileSystemHandlerConfig instance) Create a new fluent API builder from an existing instance.static FileSystemHandlerConfigCreate a new instance from configuration.static FileSystemHandlerConfigCreate a new file system based static content configuration from the defined location.location()The directory (or a single file) that contains the root of the static content.Methods inherited from interface BaseHandlerConfig
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.
-
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
Create a new file system based static content configuration from the defined location. All other configuration is default.- Parameters:
location- path on file system that is the root of static content (all files under it will be available!)- Returns:
- a new configuration for classpath static content handler
-
location
Path location()The directory (or a single file) that contains the root of the static content.- Returns:
- location to serve the static content, such as
"/home/user/static-content".
-