Class CompositeResolver.Builder
java.lang.Object
com.djrapitops.plan.delivery.web.resolver.CompositeResolver.Builder
- Enclosing class:
- CompositeResolver
-
Method Summary
Modifier and TypeMethodDescriptionAdd a new resolver to the CompositeResolver.Add a new resolver to the CompositeResolver by using functional interfacesbuild()
-
Method Details
-
add
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
-