Class CorsConfig.Builder
java.lang.Object
io.helidon.webserver.cors.CorsConfig.BuilderBase<CorsConfig.Builder, CorsConfig>
io.helidon.webserver.cors.CorsConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<CorsConfig.Builder, CorsConfig>, Builder<CorsConfig.Builder, CorsFeature>, ConfigBuilderSupport.ConfiguredBuilder<CorsConfig.Builder, CorsConfig>, Supplier<CorsFeature>
- Enclosing interface:
CorsConfig
public static class CorsConfig.Builder
extends CorsConfig.BuilderBase<CorsConfig.Builder, CorsConfig>
implements Builder<CorsConfig.Builder, CorsFeature>
Fluent API builder for
CorsFeature.-
Nested Class Summary
Nested classes/interfaces inherited from class CorsConfig.BuilderBase
CorsConfig.BuilderBase.CorsConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class CorsConfig.BuilderBase
addDefaults, addDefaults, addPath, addPath, addPaths, addSocket, addSockets, clearPaths, clearSockets, config, config, enabled, enabled, from, from, name, name, paths, paths, pathsDiscoverServices, pathsDiscoverServices, preBuildPrototype, serviceRegistry, serviceRegistry, sockets, sockets, toString, validatePrototype, weight, weightModifier and TypeMethodDescriptionbooleanWhether to add a default path configuration, that matches all paths,GET, HEAD, POSTmethods, and allows all origins, methods, and headers.addDefaults(boolean addDefaults) Whether to add a default path configuration, that matches all paths,GET, HEAD, POSTmethods, and allows all origins, methods, and headers.addPath(CorsPathConfig path) Per path configuration.addPath(Consumer<CorsPathConfig.Builder> consumer) Per path configuration.addPaths(List<? extends CorsPathConfig> paths) Per path configuration.List of sockets to register this feature on.addSockets(Set<String> sockets) List of sockets to register this feature on.Clear all paths.Clear all sockets.config()Configuration used to configure this instance.Update builder from configuration (node of this type).enabled()This feature can be disabled.enabled(boolean enabled) This feature can be disabled.from(CorsConfig prototype) Update this builder from an existing prototype instance.from(CorsConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()Name of this instance.Name of this instance.paths()Per path configuration.paths(List<? extends CorsPathConfig> paths) Per path configuration.booleanService discovery flag forCorsConfig.BuilderBase.paths().pathsDiscoverServices(boolean pathsDiscoverServices) Service discovery flag forCorsConfig.BuilderBase.paths().protected voidHandles providers and decorators.Service registry used to discover providers and services.serviceRegistry(ServiceRegistry serviceRegistry) Service registry used to discover providers and services.sockets()List of sockets to register this feature on.List of sockets to register this feature on.toString()protected voidValidates required properties.doubleweight()Weight of the CORS feature.weight(double weight) Weight of the CORS feature.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault CorsFeatureget()default CorsConfig.Builderidentity()Instance of this builder as the correct type.default CorsConfig.Builderupdate(Consumer<CorsConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault CorsConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<CorsConfig.Builder, CorsConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<CorsConfig.Builder, CorsFeature>- Returns:
- instance of the built type
-