one.valuelogic.vertx.web.problem.NotFoundHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vertx-web-problem Show documentation
Show all versions of vertx-web-problem Show documentation
vertx-web integration with zalando problem
package one.valuelogic.vertx.web.problem;
import io.vertx.core.Handler;
import io.vertx.rxjava.ext.web.RoutingContext;
import static javax.ws.rs.core.Response.Status.NOT_FOUND;
import static org.zalando.problem.Problem.valueOf;
public class NotFoundHandler implements Handler {
@Override
public void handle(RoutingContext context) {
context.fail(valueOf(NOT_FOUND));
}
public static NotFoundHandler create() {
return new NotFoundHandler();
}
}