Class StaticContentSupport.Builder<B extends StaticContentSupport.Builder<B>>

java.lang.Object
io.helidon.webserver.staticcontent.StaticContentSupport.Builder<B>
Type Parameters:
B - type of a subclass of a concrete builder
All Implemented Interfaces:
Builder<B,StaticContentSupport>, Supplier<StaticContentSupport>
Direct Known Subclasses:
StaticContentSupport.FileBasedBuilder
Enclosing interface:
StaticContentSupport

public abstract static class StaticContentSupport.Builder<B extends StaticContentSupport.Builder<B>> extends Object implements Builder<B,StaticContentSupport>
Fluent builder of the StaticContent detailed parameters.
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • build

      public final StaticContentSupport build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<B extends StaticContentSupport.Builder<B>,StaticContentSupport>
      Returns:
      instance of the built type
    • doBuild

      protected abstract StaticContentSupport doBuild()
      Build the actual instance.
      Returns:
      static content support
    • welcomeFileName

      public B welcomeFileName(String welcomeFileName)
      Sets a name of the "file" which will be returned if directory is requested.
      Parameters:
      welcomeFileName - a name of the welcome file
      Returns:
      updated builder
    • pathMapper

      public B pathMapper(Function<String,String> resolvePathFunction)
      Map request path to resource path. Default uses the same path as requested. This can be used to resolve all paths to a single file, or to filter out files.
      Parameters:
      resolvePathFunction - function
      Returns:
      updated builder