public final class CompositeResolver extends java.lang.Object implements Resolver
CompositeResolver removes first part of the target with URIPath.omitFirst()
before calling the child Resolvers.
Example: resolverService.registerResolver("/test/", compositeResolver);
The Resolvers added to CompositeResolver will be given Request with URIPath "/".
Modifier and Type | Class and Description |
---|---|
static class |
CompositeResolver.Builder |
Modifier and Type | Method and Description |
---|---|
static CompositeResolver.Builder |
builder() |
boolean |
canAccess(Request request)
Implement access control if authorization is enabled.
|
java.util.Optional<Response> |
resolve(Request request)
Implement request resolution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newResponseBuilder, requiresAuth
public static CompositeResolver.Builder builder()
public boolean canAccess(Request request)
Resolver
Is not called when access control is not active.
canAccess
in interface Resolver
request
- HTTP request, contains all information necessary to check access.for {@link WebUser} that has access permissions.
public java.util.Optional<Response> resolve(Request request)
Resolver
resolve
in interface Resolver
request
- HTTP request, contains all information necessary to resolve the request.for return value
,
for path /example/path etc
,
for parameters ?param=value etc