Module io.helidon.webserver.cors
Package io.helidon.webserver.cors
Class MappedCrossOriginConfig.Builder
- java.lang.Object
-
- io.helidon.webserver.cors.MappedCrossOriginConfig.Builder
-
- All Implemented Interfaces:
Builder<MappedCrossOriginConfig>
,Supplier<MappedCrossOriginConfig>
- Enclosing class:
- MappedCrossOriginConfig
public static class MappedCrossOriginConfig.Builder extends Object implements Builder<MappedCrossOriginConfig>
Fluent builder forMapped
cross-origin config.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappedCrossOriginConfig
build()
Build the instance from this builder.MappedCrossOriginConfig.Builder
config(Config corsConfig)
Applies data in the provided config node.MappedCrossOriginConfig.Builder
enabled(boolean enabled)
Sets whether the resultingMapped
cross-origin config should be enabled.MappedCrossOriginConfig.Builder
name(String name)
Sets the name for the CORS-enabled component or app (primarily for logging).MappedCrossOriginConfig.Builder
put(String path, CrossOriginConfig.Builder builder)
Adds a new builder to the collection, associating it with the given path.
-
-
-
Method Detail
-
build
public MappedCrossOriginConfig build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<MappedCrossOriginConfig>
- Returns:
- instance of the built type
-
name
public MappedCrossOriginConfig.Builder name(String name)
Sets the name for the CORS-enabled component or app (primarily for logging).- Parameters:
name
- name for the component- Returns:
- updated builder
-
enabled
public MappedCrossOriginConfig.Builder enabled(boolean enabled)
Sets whether the resultingMapped
cross-origin config should be enabled.- Parameters:
enabled
- true to enable; false to disable- Returns:
- updated builder
-
put
public MappedCrossOriginConfig.Builder put(String path, CrossOriginConfig.Builder builder)
Adds a new builder to the collection, associating it with the given path.- Parameters:
path
- the path to link with the builderbuilder
- the builder to use in building the actualCrossOriginConfig
instance- Returns:
- updated builder
-
config
public MappedCrossOriginConfig.Builder config(Config corsConfig)
Applies data in the provided config node.- Parameters:
corsConfig
-Config
node containing CORS information- Returns:
- updated builder
-
-