Search in sources :

Example 1 with Rigor

use of io.vertx.up.rs.announce.Rigor in project vertx-zero by silentbalanceyh.

the class Flower method verifyCodex.

private static void verifyCodex(final RoutingContext context, final Map<String, List<Rule>> rulers, final Depot depot, final Class<?> type, final Object value) {
    final Rigor rigor = Rigor.get(type);
    if (null == rigor) {
        LOGGER.warn(Info.RIGOR_NOT_FOUND, type);
        context.next();
    } else {
        final WebException error = rigor.verify(rulers, value);
        if (null == error) {
            // Ignore Errors
            context.next();
        } else {
            // Reply Error
            replyError(context, error, depot.getEvent());
        }
    }
}
Also used : WebException(io.vertx.up.exception.WebException) Rigor(io.vertx.up.rs.announce.Rigor)

Aggregations

WebException (io.vertx.up.exception.WebException)1 Rigor (io.vertx.up.rs.announce.Rigor)1