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

io.vertx.sqlclient.impl.command.CompositeCommand Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR1
Show newest version
package io.vertx.sqlclient.impl.command;

import io.vertx.core.Future;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.future.PromiseInternal;

import java.util.ArrayList;
import java.util.List;

public class CompositeCommand extends CommandBase {

  private final List> commands = new ArrayList<>();

  public  Future add(ContextInternal context, CommandBase cmd) {
    PromiseInternal promise = context.promise();
    cmd.handler = promise;
    commands.add(cmd);
    return promise.future();
  }

  public List> commands() {
    return commands;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy