Package com.linecorp.armeria.server
Interface RejectedPathMappingHandler
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RejectedPathMappingHandler
A handler that is invoked when aServerBuilder
rejects to bind aService
at a certainPathMapping
. For example, the following code will trigger this handler:ServerBuilder sb = new ServerBuilder(); sb.service("/hello", serviceA); sb.service("/hello", serviceB); // Tried to bind at the same path mapping again. sb.build();
-
-
Field Summary
Fields Modifier and Type Field Description static RejectedPathMappingHandler
DISABLED
ARejectedPathMappingHandler
that does nothing for a problematicPathMapping
.static RejectedPathMappingHandler
FAIL
static RejectedPathMappingHandler
WARN
ARejectedPathMappingHandler
that logs a warning message for a problematicPathMapping
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleDuplicatePathMapping(VirtualHost virtualHost, PathMapping mapping, PathMapping existingMapping)
Invoked when a user attempts to bind aService
at thePathMapping
that conflicts with an existingPathMapping
.
-
-
-
Field Detail
-
DISABLED
static final RejectedPathMappingHandler DISABLED
ARejectedPathMappingHandler
that does nothing for a problematicPathMapping
.
-
WARN
static final RejectedPathMappingHandler WARN
ARejectedPathMappingHandler
that logs a warning message for a problematicPathMapping
.
-
FAIL
static final RejectedPathMappingHandler FAIL
-
-
Method Detail
-
handleDuplicatePathMapping
void handleDuplicatePathMapping(VirtualHost virtualHost, PathMapping mapping, PathMapping existingMapping) throws Exception
Invoked when a user attempts to bind aService
at thePathMapping
that conflicts with an existingPathMapping
.- Parameters:
virtualHost
- theVirtualHost
where thePathMapping
belong tomapping
- thePathMapping
being addedexistingMapping
- the existingPathMapping
- Throws:
Exception
-
-