io.vertx.mutiny.ext.web.validation.ValidationHandler Maven / Gradle / Ivy
The newest version!
package io.vertx.mutiny.ext.web.validation;
import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;
import io.vertx.core.Handler;
/**
* This is the entry point of this module. Provides the parsing, validation and puts the parsed objects into .
*
* You can easily build a new validation handler using a , that you can create with .
*
* For more info read the doc.
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.validation.ValidationHandler original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.validation.ValidationHandler.class)
public class ValidationHandler implements io.vertx.core.Handler, java.util.function.Consumer {
public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new ValidationHandler((io.vertx.ext.web.validation.ValidationHandler) obj),
ValidationHandler::getDelegate
);
private final io.vertx.ext.web.validation.ValidationHandler delegate;
public ValidationHandler(io.vertx.ext.web.validation.ValidationHandler delegate) {
this.delegate = delegate;
}
public ValidationHandler(Object delegate) {
this.delegate = (io.vertx.ext.web.validation.ValidationHandler)delegate;
}
/**
* Empty constructor used by CDI, do not use this constructor directly.
**/
ValidationHandler() {
this.delegate = null;
}
public io.vertx.ext.web.validation.ValidationHandler getDelegate() {
return delegate;
}
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ValidationHandler that = (ValidationHandler) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public void handle(io.vertx.mutiny.ext.web.RoutingContext arg0) {
delegate.handle(arg0.getDelegate());
}
/**
* @param parser a SchemaParser
* @return an instance of .
* @deprecated This method duplicates the behavior of {@link ValidationHandlerBuilder#create(SchemaParser)}. */
@Deprecated
public static io.vertx.mutiny.ext.web.validation.builder.ValidationHandlerBuilder builder(io.vertx.mutiny.json.schema.SchemaParser parser) {
io.vertx.mutiny.ext.web.validation.builder.ValidationHandlerBuilder ret = io.vertx.mutiny.ext.web.validation.builder.ValidationHandlerBuilder.newInstance((io.vertx.ext.web.validation.builder.ValidationHandlerBuilder)io.vertx.ext.web.validation.ValidationHandler.builder(parser.getDelegate()));
return ret;
}
public static final String REQUEST_CONTEXT_KEY = io.vertx.ext.web.validation.ValidationHandler.REQUEST_CONTEXT_KEY;
public void accept(io.vertx.mutiny.ext.web.RoutingContext item) {
handle(item);
}
public static ValidationHandler newInstance(io.vertx.ext.web.validation.ValidationHandler arg) {
return arg != null ? new ValidationHandler(arg) : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy