Class CorsPathConfig.Builder
java.lang.Object
io.helidon.webserver.cors.CorsPathConfig.BuilderBase<CorsPathConfig.Builder, CorsPathConfig>
io.helidon.webserver.cors.CorsPathConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<CorsPathConfig.Builder, CorsPathConfig>, Builder<CorsPathConfig.Builder, CorsPathConfig>, ConfigBuilderSupport.ConfiguredBuilder<CorsPathConfig.Builder, CorsPathConfig>, Supplier<CorsPathConfig>
- Enclosing interface:
CorsPathConfig
public static class CorsPathConfig.Builder
extends CorsPathConfig.BuilderBase<CorsPathConfig.Builder, CorsPathConfig>
implements Builder<CorsPathConfig.Builder, CorsPathConfig>
Fluent API builder for
CorsPathConfig.-
Nested Class Summary
Nested classes/interfaces inherited from class CorsPathConfig.BuilderBase
CorsPathConfig.BuilderBase.CorsPathConfigImplModifier 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 CorsPathConfig.BuilderBase
addAllowHeader, addAllowHeader, addAllowHeaders, addAllowMethod, addAllowMethod, addAllowMethods, addAllowOrigin, addAllowOrigins, addExposeHeader, addExposeHeader, addExposeHeaders, allowCredentials, allowCredentials, allowHeaders, allowHeaders, allowMethods, allowMethods, allowOrigins, allowOrigins, clearAllowHeaders, clearAllowMethods, clearAllowOrigins, clearExposeHeaders, config, config, enabled, enabled, exclusive, exclusive, exposeHeaders, exposeHeaders, from, from, maxAge, maxAge, pathPattern, pathPattern, preBuildPrototype, toString, validatePrototypeModifier and TypeMethodDescriptionaddAllowHeader(HeaderName headerName) Add an allowed header name.addAllowHeader(String allowHeader) Set of allowed headers, defaults to all.addAllowHeaders(Set<String> allowHeaders) Set of allowed headers, defaults to all.addAllowMethod(Method method) Add an allowed method.addAllowMethod(String allowMethod) Set of allowed case-sensitive HTTP method names, defaults to all.addAllowMethods(Set<String> allowMethods) Set of allowed case-sensitive HTTP method names, defaults to all.addAllowOrigin(String allowOrigin) Set of allowed origins, defaults to all.addAllowOrigins(Set<String> allowOrigins) Set of allowed origins, defaults to all.addExposeHeader(HeaderName headerName) Add an exposed header name.addExposeHeader(String exposeHeader) Set of exposed headers, defaults to none.addExposeHeaders(Set<String> exposeHeaders) Set of exposed headers, defaults to none.booleanWhether to allow credentials.allowCredentials(boolean allowCredentials) Whether to allow credentials.Set of allowed headers, defaults to all.allowHeaders(Set<String> allowHeaders) Set of allowed headers, defaults to all.Set of allowed case-sensitive HTTP method names, defaults to all.allowMethods(Set<String> allowMethods) Set of allowed case-sensitive HTTP method names, defaults to all.Set of allowed origins, defaults to all.allowOrigins(Set<String> allowOrigins) Set of allowed origins, defaults to all.Clear all allowHeaders.Clear all allowMethods.Clear all allowOrigins.Clear all exposeHeaders.config()Configuration used to configure this instance.Update builder from configuration (node of this type).booleanenabled()Whether this CORS configuration should be enabled or not.enabled(boolean enabled) Whether this CORS configuration should be enabled or not.booleanWhether this acts as an exclusive configuration for the configuredpathPattern.exclusive(boolean exclusive) Whether this acts as an exclusive configuration for the configuredpathPattern.Set of exposed headers, defaults to none.exposeHeaders(Set<String> exposeHeaders) Set of exposed headers, defaults to none.from(CorsPathConfig prototype) Update this builder from an existing prototype instance.from(CorsPathConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.maxAge()Max age as a duration.Max age as a duration.Path pattern to apply this configuration for.pathPattern(String pathPattern) Path pattern to apply this configuration for.protected voidHandles providers and decorators.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault CorsPathConfigget()default CorsPathConfig.Builderidentity()Instance of this builder as the correct type.default CorsPathConfig.Builderupdate(Consumer<CorsPathConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault CorsPathConfig.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<CorsPathConfig.Builder, CorsPathConfig>- 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<CorsPathConfig.Builder, CorsPathConfig>- Returns:
- instance of the built type
-