Module io.helidon.cors
Package io.helidon.cors
Class CorsSupportBase.Builder<Q,R,T extends CorsSupportBase<Q,R,T,B>,B extends CorsSupportBase.Builder<Q,R,T,B>>
java.lang.Object
io.helidon.cors.CorsSupportBase.Builder<Q,R,T,B>
- Type Parameters:
Q- request type wrapped by request adapterR- response type wrapped by response adapterT- specific subtype ofCorsSupportBasethe builder createsB- type of the builder
- All Implemented Interfaces:
Builder<B,,CorsSupportBase<Q, R, T, B>> CorsSetter<CorsSupportBase.Builder<Q,,R, T, B>> Supplier<CorsSupportBase<Q,R, T, B>>
- Direct Known Subclasses:
CorsSupport.Builder
- Enclosing class:
CorsSupportBase<Q,R, T extends CorsSupportBase<Q, R, T, B>, B extends CorsSupportBase.Builder<Q, R, T, B>>
public abstract static class CorsSupportBase.Builder<Q,R,T extends CorsSupportBase<Q,R,T,B>,B extends CorsSupportBase.Builder<Q,R,T,B>>
extends Object
implements Builder<B,CorsSupportBase<Q,R,T,B>>, CorsSetter<CorsSupportBase.Builder<Q,R,T,B>>
Builder for
CorsSupportBase instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCrossOrigin(CrossOriginConfig crossOrigin) Adds cross origin information associated with the default path.addCrossOrigin(String path, CrossOriginConfig crossOrigin) Adds cross origin information associated with a given path.allowCredentials(boolean allowCredentials) Sets the allow credentials flag.allowHeaders(String... allowHeaders) Sets the allow headers.allowMethods(String... allowMethods) Sets the allow methods.allowOrigins(String... origins) Sets the allowOrigins.abstract Tbuild()Build the instance from this builder.Deprecated, for removal: This API element is subject to removal in a future version.Merges CORS config information.enabled(boolean value) Sets whether CORS support should be enabled or not.exposeHeaders(String... exposeHeaders) Sets the expose headers.mappedConfig(Config config) Deprecated, for removal: This API element is subject to removal in a future version.usemappedConfig(io.helidon.config.Config)insteadmappedConfig(Config config) Merges mapped CORS config information.maxAgeSeconds(long maxAgeSeconds) Sets the maximum age.Sets the name to be used for the CORS support instance.protected Bprotected BsecondaryLookupSupplier(Supplier<Optional<CrossOriginConfig>> secondaryLookupSupplier) Not for developer use. Sets a back-up way to provide aCrossOriginConfiginstance if, during look-up for a given request, none is found from the aggregator.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder. -
config
Deprecated, for removal: This API element is subject to removal in a future version.useconfig(io.helidon.config.Config)insteadMerges CORS config information.- Parameters:
config- the CORS config- Returns:
- the updated builder
-
config
Merges CORS config information. Typically, the app or component will retrieve the providedConfiginstance from its own config.- Parameters:
config- the CORS config- Returns:
- the updated builder
-
mappedConfig
Deprecated, for removal: This API element is subject to removal in a future version.usemappedConfig(io.helidon.config.Config)insteadMerges mapped CORS config information. Typically, the app or component will retrieve the providedConfiginstance from its own config.- Parameters:
config- the mapped CORS config information- Returns:
- the updated builder
-
mappedConfig
Merges mapped CORS config information. Typically, the app or component will retrieve the providedConfiginstance from its own config.- Parameters:
config- the mapped CORS config information- Returns:
- the updated builder
-
enabled
Sets whether CORS support should be enabled or not.- Specified by:
enabledin interfaceCorsSetter<Q>- Parameters:
value- whether to use CORS support- Returns:
- updated builder
-
addCrossOrigin
Adds cross origin information associated with a given path.- Parameters:
path- the path to which the cross origin information appliescrossOrigin- the cross origin information- Returns:
- updated builder
-
addCrossOrigin
Adds cross origin information associated with the default path.- Parameters:
crossOrigin- the cross origin information- Returns:
- updated builder
-
name
Sets the name to be used for the CORS support instance.- Parameters:
name- name to use- Returns:
- updated builder
-
allowOrigins
Description copied from interface:CorsSetterSets the allowOrigins.- Specified by:
allowOriginsin interfaceCorsSetter<Q>- Parameters:
origins- the origin value(s)- Returns:
- updated setter
-
allowHeaders
Description copied from interface:CorsSetterSets the allow headers.- Specified by:
allowHeadersin interfaceCorsSetter<Q>- Parameters:
allowHeaders- the allow headers value(s)- Returns:
- updated setter
-
exposeHeaders
Description copied from interface:CorsSetterSets the expose headers.- Specified by:
exposeHeadersin interfaceCorsSetter<Q>- Parameters:
exposeHeaders- the expose headers value(s)- Returns:
- updated setter
-
allowMethods
Description copied from interface:CorsSetterSets the allow methods.- Specified by:
allowMethodsin interfaceCorsSetter<Q>- Parameters:
allowMethods- the allow method value(s)- Returns:
- updated setter
-
allowCredentials
Description copied from interface:CorsSetterSets the allow credentials flag.- Specified by:
allowCredentialsin interfaceCorsSetter<Q>- Parameters:
allowCredentials- the allow credentials flag- Returns:
- updated setter
-
maxAgeSeconds
Description copied from interface:CorsSetterSets the maximum age.- Specified by:
maxAgeSecondsin interfaceCorsSetter<Q>- Parameters:
maxAgeSeconds- the maximum age- Returns:
- updated setter
-
secondaryLookupSupplier
Not for developer use. Sets a back-up way to provide aCrossOriginConfiginstance if, during look-up for a given request, none is found from the aggregator.- Parameters:
secondaryLookupSupplier- supplier of a CrossOriginConfig- Returns:
- updated builder
-
requestDefaultBehaviorIfNone
-
config(io.helidon.config.Config)instead