Class CorsSupportHelper.Builder<Q,R>

java.lang.Object
io.helidon.cors.CorsSupportHelper.Builder<Q,R>
Type Parameters:
Q - type of request wrapped by adapter
R - type of response wrapped by adapter
All Implemented Interfaces:
Builder<CorsSupportHelper.Builder<Q,R>,CorsSupportHelper<Q,R>>, Supplier<CorsSupportHelper<Q,R>>
Enclosing class:
CorsSupportHelper<Q,R>

public static class CorsSupportHelper.Builder<Q,R> extends Object implements Builder<CorsSupportHelper.Builder<Q,R>,CorsSupportHelper<Q,R>>
Builder class for CorsSupportHelpers.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • secondaryLookupSupplier

      public CorsSupportHelper.Builder<Q,R> secondaryLookupSupplier(Supplier<Optional<CrossOriginConfig>> secondaryLookup)
      Sets the supplier for the secondary lookup of CORS information (typically not contained in configuration).
      Parameters:
      secondaryLookup - the supplier
      Returns:
      updated builder
    • config

      public CorsSupportHelper.Builder<Q,R> config(Config config)
      Adds cross-origin information via config.
      Parameters:
      config - config node containing CORS set-up information
      Returns:
      updated builder
    • mappedConfig

      public CorsSupportHelper.Builder<Q,R> mappedConfig(Config config)
      Adds mapped cross-origin information via config.
      Parameters:
      config - config node containing mapped CORS set-up information
      Returns:
      updated builder
    • name

      public CorsSupportHelper.Builder<Q,R> name(String name)
      Sets the name; typically the name from the CORS support instance this helper helps.
      Parameters:
      name - name to set
      Returns:
      updated builder
    • build

      public CorsSupportHelper<Q,R> build()
      Creates the CorsSupportHelper.
      Specified by:
      build in interface Builder<Q,R>
      Returns:
      initialized CorsSupportHelper