![JAR search and dependency download from the Maven repository](/logo.png)
com.nike.riposte.server.error.exception.MultipleMatchingEndpointsException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riposte-spi Show documentation
Show all versions of riposte-spi Show documentation
Riposte module riposte-spi
package com.nike.riposte.server.error.exception;
import com.nike.riposte.server.http.Endpoint;
import java.util.List;
import java.util.stream.Collectors;
/**
* Thrown when multiple endpoints want to match a request (with both path and HTTP method matching).
*
* @author Nic Munroe
*/
public class MultipleMatchingEndpointsException extends RuntimeException {
public final List matchingEndpointsDetails;
public final String requestPath;
public final String requestMethod;
public MultipleMatchingEndpointsException(String message, List> fullyMatchingEndpoints,
String requestPath, String requestMethod) {
super(message);
this.matchingEndpointsDetails = fullyMatchingEndpoints.stream()
.map(e -> e.getClass().getName())
.collect(Collectors.toList());
this.requestPath = requestPath;
this.requestMethod = requestMethod;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy