Class CompositeResolver.Builder
- java.lang.Object
-
- com.djrapitops.plan.delivery.web.resolver.CompositeResolver.Builder
-
- Enclosing class:
- CompositeResolver
public static class CompositeResolver.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeResolver.Builder
add(java.lang.String prefix, Resolver resolver)
Add a new resolver to the CompositeResolver.CompositeResolver.Builder
add(java.lang.String prefix, java.util.function.Function<Request,Response> resolver, java.util.function.Predicate<Request> accessCheck)
Add a new resolver to the CompositeResolver by using functional interfacesCompositeResolver
build()
-
-
-
Method Detail
-
add
public CompositeResolver.Builder add(java.lang.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(java.lang.String prefix, java.util.function.Function<Request,Response> resolver, java.util.function.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()
-
-