Class CompositeResolver.Builder

java.lang.Object
com.djrapitops.plan.delivery.web.resolver.CompositeResolver.Builder
Enclosing class:
CompositeResolver

public static class CompositeResolver.Builder extends Object
  • Method Details

    • add

      public CompositeResolver.Builder add(String prefix, Resolver resolver)
      Add a new resolver to the CompositeResolver.
      Parameters:
      prefix - Start of the target (first part of the target string, eg "example" in "/example/target/", or "" in "/")
      resolver - Resolver to call for this target, URIPath.omitFirst() will be called for Resolver method calls.
      Returns:
      this builder.
    • add

      public CompositeResolver.Builder add(String prefix, Function<Request,Response> resolver, Predicate<Request> accessCheck)
      Add a new resolver to the CompositeResolver by using functional interfaces
      Parameters:
      prefix - Start of the target (first part of the target string, eg "example" in "/example/target/", or "" in "/")
      resolver - Resolver to call for this target, URIPath.omitFirst() will be called for Resolver method calls.
      accessCheck - Function for checking if request should be allowed (true, default) or forbidden (false).
      Returns:
      this builder.
    • build

      public CompositeResolver build()