io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandlerBuilder Maven / Gradle / Ivy
package io.vertx.mutiny.ext.web.handler.graphql;
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.ext.web.handler.graphql.GraphQLHandlerOptions;
import io.vertx.core.Handler;
/**
* A builder for {@link io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandler} instances.
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder.class)
public class GraphQLHandlerBuilder {
public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new GraphQLHandlerBuilder((io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder) obj),
GraphQLHandlerBuilder::getDelegate
);
private final io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder delegate;
public GraphQLHandlerBuilder(io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder delegate) {
this.delegate = delegate;
}
public GraphQLHandlerBuilder(Object delegate) {
this.delegate = (io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder)delegate;
}
/**
* Empty constructor used by CDI, do not use this constructor directly.
**/
GraphQLHandlerBuilder() {
this.delegate = null;
}
public io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder 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;
GraphQLHandlerBuilder that = (GraphQLHandlerBuilder) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
/**
* @param options
* @return a reference to this, so the API can be used fluently
*/
@Fluent
public io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandlerBuilder with(io.vertx.ext.web.handler.graphql.GraphQLHandlerOptions options) {
delegate.with(options);
return this;
}
/**
* @param beforeExecuteHandler the callback to invoke
* @return a reference to this, so the API can be used fluently
*/
@Fluent
private io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandlerBuilder __beforeExecute(Handler> beforeExecuteHandler) {
delegate.beforeExecute(new io.smallrye.mutiny.vertx.DelegatingHandler<>(beforeExecuteHandler, event -> io.vertx.mutiny.ext.web.handler.graphql.ExecutionInputBuilderWithContext.newInstance((io.vertx.ext.web.handler.graphql.ExecutionInputBuilderWithContext)event, new TypeArg(o0 -> io.vertx.mutiny.ext.web.RoutingContext.newInstance((io.vertx.ext.web.RoutingContext)o0), o0 -> o0.getDelegate()))));
return this;
}
/**
* @param beforeExecuteHandler the callback to invoke
* @return
*/
public io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandlerBuilder beforeExecute(java.util.function.Consumer> beforeExecuteHandler) {
return __beforeExecute(beforeExecuteHandler != null ? new io.smallrye.mutiny.vertx.DelegatingConsumerHandler(beforeExecuteHandler) : null);
}
/**
* @return a new instance of {@link io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandler}
*/
public io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandler build() {
io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandler ret = io.vertx.mutiny.ext.web.handler.graphql.GraphQLHandler.newInstance((io.vertx.ext.web.handler.graphql.GraphQLHandler)delegate.build());
return ret;
}
public static GraphQLHandlerBuilder newInstance(io.vertx.ext.web.handler.graphql.GraphQLHandlerBuilder arg) {
return arg != null ? new GraphQLHandlerBuilder(arg) : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy