Module io.helidon.webserver.cors
Package io.helidon.webserver.cors
Class CorsConfig.BuilderBase.CorsConfigImpl
java.lang.Object
io.helidon.webserver.cors.CorsConfig.BuilderBase.CorsConfigImpl
- All Implemented Interfaces:
Prototype.Api,Prototype.Factory<CorsFeature>,Weighted,CorsConfig,Comparable<Weighted>,Supplier<CorsFeature>
- Enclosing class:
CorsConfig.BuilderBase<BUILDER extends CorsConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends CorsConfig>
protected static class CorsConfig.BuilderBase.CorsConfigImpl
extends Object
implements CorsConfig, Supplier<CorsFeature>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.cors.CorsConfig
CorsConfig.Builder, CorsConfig.BuilderBase<BUILDER extends CorsConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends CorsConfig> -
Field Summary
Fields inherited from interface io.helidon.common.Weighted
DEFAULT_WEIGHT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCorsConfigImpl(CorsConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether to add a default path configuration, that matches all paths,GET, HEAD, POSTmethods, and allows all origins, methods, and headers.build()Create a new instance of the runtime type from this config object.config()Deprecated, for removal: This API element is subject to removal in a future version.booleanenabled()This feature can be disabled.booleanget()inthashCode()name()Name of this instance.paths()Per path configuration.sockets()List of sockets to register this feature on.toString()doubleweight()Weight of the CORS feature.
-
Constructor Details
-
CorsConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.FactoryCreate a new instance of the runtime type from this config object.- Specified by:
buildin interfacePrototype.Factory<CorsFeature>- Returns:
- new configured runtime instance
-
get
- Specified by:
getin interfaceSupplier<CorsFeature>
-
weight
public double weight()Description copied from interface:CorsConfigWeight of the CORS feature. As it is used by other features, the default is quite high: 850.0.- Specified by:
weightin interfaceCorsConfig- Specified by:
weightin interfaceWeighted- Returns:
- weight of the feature
-
sockets
Description copied from interface:CorsConfigList of sockets to register this feature on. If empty, it would get registered on all sockets.- Specified by:
socketsin interfaceCorsConfig- Returns:
- socket names to register on, defaults to empty (all available sockets)
-
name
Description copied from interface:CorsConfigName of this instance.- Specified by:
namein interfaceCorsConfig- Returns:
- instance name
-
enabled
public boolean enabled()Description copied from interface:CorsConfigThis feature can be disabled. This feature is automatically enabled if there is at least oneCorsConfig.paths()defined.- Specified by:
enabledin interfaceCorsConfig- Returns:
- whether the feature is enabled
-
paths
Description copied from interface:CorsConfigPer path configuration. Default path is added, unlessCorsConfig.addDefaults()is set tofalse.- Specified by:
pathsin interfaceCorsConfig- Returns:
- per path configurations
-
addDefaults
public boolean addDefaults()Description copied from interface:CorsConfigWhether to add a default path configuration, that matches all paths,GET, HEAD, POSTmethods, and allows all origins, methods, and headers. This is always added as a last path.- Specified by:
addDefaultsin interfaceCorsConfig- Returns:
- whether to add defaults as the last path, defaults to
true
-
config
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:CorsConfigAccess to config that was used to create this feature.- Specified by:
configin interfaceCorsConfig- Returns:
- configuration
-
toString
-
equals
-
hashCode
public int hashCode()
-