Class CorsConfig.BuilderBase.CorsConfigImpl

java.lang.Object
io.helidon.webserver.cors.CorsConfig.BuilderBase.CorsConfigImpl
All Implemented Interfaces:
Prototype.Api, Prototype.Factory<CorsFeature>, Weighted, CorsConfig, Comparable<Weighted>, Supplier<CorsFeature>
Enclosing class:
CorsConfig.BuilderBase<BUILDER extends CorsConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CorsConfig>

protected static class CorsConfig.BuilderBase.CorsConfigImpl extends Object implements CorsConfig, Supplier<CorsFeature>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • CorsConfigImpl

      protected CorsConfigImpl(CorsConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • build

      public CorsFeature build()
      Description copied from interface: Prototype.Factory
      Create a new instance of the runtime type from this config object.
      Specified by:
      build in interface Prototype.Factory<CorsFeature>
      Returns:
      new configured runtime instance
    • get

      public CorsFeature get()
      Specified by:
      get in interface Supplier<CorsFeature>
    • weight

      public double weight()
      Description copied from interface: CorsConfig
      Weight of the CORS feature. As it is used by other features, the default is quite high: 850.0.
      Specified by:
      weight in interface CorsConfig
      Specified by:
      weight in interface Weighted
      Returns:
      weight of the feature
    • sockets

      public Set<String> sockets()
      Description copied from interface: CorsConfig
      List of sockets to register this feature on. If empty, it would get registered on all sockets.
      Specified by:
      sockets in interface CorsConfig
      Returns:
      socket names to register on, defaults to empty (all available sockets)
    • name

      public String name()
      Description copied from interface: CorsConfig
      Name of this instance.
      Specified by:
      name in interface CorsConfig
      Returns:
      instance name
    • enabled

      public boolean enabled()
      Description copied from interface: CorsConfig
      This feature can be disabled. This feature is automatically enabled if there is at least one CorsConfig.paths() defined.
      Specified by:
      enabled in interface CorsConfig
      Returns:
      whether the feature is enabled
    • paths

      public List<CorsPathConfig> paths()
      Description copied from interface: CorsConfig
      Per path configuration. Default path is added, unless CorsConfig.addDefaults() is set to false.
      Specified by:
      paths in interface CorsConfig
      Returns:
      per path configurations
    • addDefaults

      public boolean addDefaults()
      Description copied from interface: CorsConfig
      Whether to add a default path configuration, that matches all paths, GET, HEAD, POST methods, and allows all origins, methods, and headers. This is always added as a last path.
      Specified by:
      addDefaults in interface CorsConfig
      Returns:
      whether to add defaults as the last path, defaults to true
    • config

      @Deprecated(since="4.4.0", forRemoval=true) public Optional<Config> config()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: CorsConfig
      Access to config that was used to create this feature.
      Specified by:
      config in interface CorsConfig
      Returns:
      configuration
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object