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