io.quarkus.resteasy.reactive.server.runtime.ExceptionMappersSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-rest Show documentation
Show all versions of quarkus-rest Show documentation
A Jakarta REST implementation utilizing build time processing and Vert.x. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it.
The newest version!
package io.quarkus.resteasy.reactive.server.runtime;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;
import org.jboss.resteasy.reactive.server.core.RuntimeExceptionMapper;
public class ExceptionMappersSupplier implements Supplier> {
@Override
public List get() {
var mappers = RuntimeExceptionMapper.getMappers();
var result = new ArrayList(mappers.size());
for (var entry : mappers.entrySet()) {
result.add(new Entry(entry.getKey().getName(), entry.getValue().getClassName(), entry.getValue().getPriority()));
}
return result;
}
public static class Entry {
private final String exceptionClassName;
private final String mapperClassName;
private final Integer priority;
public Entry(String exceptionClassName, String mapperClassName, Integer priority) {
this.exceptionClassName = exceptionClassName;
this.mapperClassName = mapperClassName;
this.priority = priority;
}
public String getExceptionClassName() {
return exceptionClassName;
}
public String getMapperClassName() {
return mapperClassName;
}
public Integer getPriority() {
return priority;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy