All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.mutiny.ext.web.handler.graphql.ws.ConnectionInitEvent Maven / Gradle / Ivy

There is a newer version: 3.17.1
Show newest version
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.core.Future;

@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent.class)
public class ConnectionInitEvent extends io.vertx.mutiny.core.Promise {

  public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>(    obj -> new ConnectionInitEvent((io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent) obj),
    ConnectionInitEvent::getDelegate
  );

  private final io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent delegate;
  
  public ConnectionInitEvent(io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent delegate) {
    super(delegate);
    this.delegate = delegate;
  }

  public ConnectionInitEvent(Object delegate) {
    super((io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent)delegate);
    this.delegate = (io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent)delegate;
  }

  /**
   * Empty constructor used by CDI, do not use this constructor directly.
   **/
  ConnectionInitEvent() {
    super(null);
    this.delegate = null;
  }

  public io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent 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;
    ConnectionInitEvent that = (ConnectionInitEvent) o;
    return delegate.equals(that.delegate);
  }
  
  @Override
  public int hashCode() {
    return delegate.hashCode();
  }

  public void complete(java.lang.Object result) { 
    delegate.complete(result);
  }

  public boolean tryComplete(java.lang.Object arg0) { 
    boolean ret = delegate.tryComplete(arg0);
    return ret;
  }

  @CheckReturnValue
  public io.smallrye.mutiny.Uni future() { 
    return io.smallrye.mutiny.vertx.UniHelper.toUni(delegate.future());}

  public java.lang.Object futureAndAwait() { 
    return future().await().indefinitely();
  }


  public void futureAndForget() { 
    future().subscribe().with(io.smallrye.mutiny.vertx.UniHelper.NOOP);
  }


  /**
   * @return message
   */
  public io.vertx.mutiny.ext.web.handler.graphql.ws.Message message() { 
    if (cached_0 != null) {
      return cached_0;
    }
    io.vertx.mutiny.ext.web.handler.graphql.ws.Message ret = io.vertx.mutiny.ext.web.handler.graphql.ws.Message.newInstance((io.vertx.ext.web.handler.graphql.ws.Message)delegate.message());
    cached_0 = ret;
    return ret;
  }

  private io.vertx.mutiny.ext.web.handler.graphql.ws.Message cached_0;
  public static  ConnectionInitEvent newInstance(io.vertx.ext.web.handler.graphql.ws.ConnectionInitEvent arg) {
    return arg != null ? new ConnectionInitEvent(arg) : null;
  }

}