java.lang.Object
io.helidon.cors.MappedCrossOriginConfig
- All Implemented Interfaces:
Iterable<Map.Entry<String,CrossOriginConfig>>
public class MappedCrossOriginConfig
extends Object
implements Iterable<Map.Entry<String,CrossOriginConfig>>
Cross-origin
CrossOriginConfig instances linked to paths, plus an enabled setting. Most developers will not
need to use this directly from their applications.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder forMappedcross-origin config. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new builder for creating aCrossOriginConfig.Mappedinstance.Creates a newMapped.Builderinstance using the provided configuration.static MappedCrossOriginConfigCreates a newMappedinstance using the provided configuration.voidforEach(BiConsumer<String, CrossOriginConfig> consumer) Invokes the specified consumer for each entry in the mapped CORS config.Finds theCrossOriginConfigassociated with the given path expression, if any.booleanReports whether this instance is enabled.iterator()name()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
builder
Returns a new builder for creating aCrossOriginConfig.Mappedinstance.- Returns:
- the new builder
-
builder
Creates a newMapped.Builderinstance using the provided configuration.Although this method is equivalent to
builder().config(config)it conveniently combines those two steps for use as a method reference.- Parameters:
config- node containingMappedcross-origin information- Returns:
- new
Mapped.Builderbased on the config
-
create
Creates a newMappedinstance using the provided configuration.- Parameters:
config- node containingMappedcross-origin information- Returns:
- new
Mappedinstance based on the config
-
iterator
- Specified by:
iteratorin interfaceIterable<Map.Entry<String,CrossOriginConfig>>
-
forEach
Invokes the specified consumer for each entry in the mapped CORS config.- Parameters:
consumer- accepts the path and theCrossOriginConfigfor processing
-
get
Finds theCrossOriginConfigassociated with the given path expression, if any.- Parameters:
pathPattern- path expression to match on- Returns:
Optionalof the corresponding basic cross-origin information
-
name
- Returns:
- the name set up for this CORS-enabled component or app
-
isEnabled
public boolean isEnabled()Reports whether this instance is enabled.- Returns:
- current enabled state
-
toString
-