Class StaticContentConfig.BuilderBase.StaticContentConfigImpl
java.lang.Object
io.helidon.webserver.staticcontent.StaticContentConfig.BuilderBase.StaticContentConfigImpl
- All Implemented Interfaces:
Prototype.Api
,Prototype.Factory<StaticContentFeature>
,StaticContentConfig
,Supplier<StaticContentFeature>
- Enclosing class:
StaticContentConfig.BuilderBase<BUILDER extends StaticContentConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends StaticContentConfig>
protected static class StaticContentConfig.BuilderBase.StaticContentConfigImpl
extends Object
implements StaticContentConfig, Supplier<StaticContentFeature>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.staticcontent.StaticContentConfig
StaticContentConfig.Builder, StaticContentConfig.BuilderBase<BUILDER extends StaticContentConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends StaticContentConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StaticContentConfigImpl
(StaticContentConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new instance of the runtime type from this config object.List of classpath based static content handlers.Maps a filename extension to the response content type.boolean
enabled()
Whether this feature is enabled, defaults totrue
.boolean
get()
int
hashCode()
Memory cache shared by the whole feature.name()
Name of this instance.path()
List of file system based static content handlers.sockets()
Sockets names (listeners) that will host static content handlers, defaults to all configured sockets.Temporary storage to use across all classpath handlers.toString()
double
weight()
Weight of the static content feature.welcome()
Welcome-file name.
-
Constructor Details
-
StaticContentConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<StaticContentFeature>
- Returns:
- new configured runtime instance
-
get
- Specified by:
get
in interfaceSupplier<StaticContentFeature>
-
enabled
public boolean enabled()Description copied from interface:StaticContentConfig
Whether this feature is enabled, defaults totrue
.- Specified by:
enabled
in interfaceStaticContentConfig
- Returns:
- whether this feature is enabled
-
weight
public double weight()Description copied from interface:StaticContentConfig
Weight of the static content feature. Defaults to 95.0.- Specified by:
weight
in interfaceStaticContentConfig
- Returns:
- weight of the feature
-
name
Description copied from interface:StaticContentConfig
Name of this instance.- Specified by:
name
in interfaceStaticContentConfig
- Returns:
- instance name
-
memoryCache
Description copied from interface:StaticContentConfig
Memory cache shared by the whole feature. If not configured, files are not cached in memory (except for explicitly marked files/resources in each section).- Specified by:
memoryCache
in interfaceStaticContentConfig
- Returns:
- memory cache, if configured
-
temporaryStorage
Description copied from interface:StaticContentConfig
Temporary storage to use across all classpath handlers. If not defined, a default one will be created.- Specified by:
temporaryStorage
in interfaceStaticContentConfig
- Returns:
- temporary storage
-
classpath
Description copied from interface:StaticContentConfig
List of classpath based static content handlers.- Specified by:
classpath
in interfaceStaticContentConfig
- Returns:
- classpath handlers
-
path
Description copied from interface:StaticContentConfig
List of file system based static content handlers.- Specified by:
path
in interfaceStaticContentConfig
- Returns:
- path handlers
-
contentTypes
Description copied from interface:StaticContentConfig
Maps a filename extension to the response content type. To have a system-wide configuration, you can use the service loader SPIMediaTypeDetector
.This method can override
MediaTypes
detection for a specific static content handler.Handler will use a union of configuration defined here, and on the handler here when used from configuration.
- Specified by:
contentTypes
in interfaceStaticContentConfig
- Returns:
- map of file extensions to associated media type
-
welcome
Description copied from interface:StaticContentConfig
Welcome-file name. Default for all handlers. By default, we do not serve default files.- Specified by:
welcome
in interfaceStaticContentConfig
- Returns:
- welcome-file name, such as
index.html
-
sockets
Description copied from interface:StaticContentConfig
Sockets names (listeners) that will host static content handlers, defaults to all configured sockets. Default socket name is@default
.This configures defaults for all handlers.
- Specified by:
sockets
in interfaceStaticContentConfig
- Returns:
- sockets to register this handler on
-
toString
-
equals
-
hashCode
public int hashCode()
-