/** * Get an optional server node, randomly choose. * @return a {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode} in server mode */ public Future<ConsulTestNode> getServerNode() { Future<ConsulTestNode> ret = Future.newInstance(delegate.getServerNode(), fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode.__TYPE_ARG); return ret; }
/** * Get an optional client node, randomly choose. * @return a <code>ConsulTestNode</code> in client mode */ public Future<ConsulTestNode> getClientNode() { Future<ConsulTestNode> ret = Future.newInstance(delegate.getClientNode(), fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode.__TYPE_ARG); return ret; }
/** * Create a succeeded future with a null result * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> succeededFuture() { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.succeededFuture(), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Created a succeeded future with the specified result. * @param result the result * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> succeededFuture(T result) { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.succeededFuture(result), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Start the node if it's not, or restart it if {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode#destroy} was not called. * <b>Warning : the first node launched by the {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestEnv} don't have the <code>start_join</code> property. If this node is stopped, he won't join the cluster on restart, even if the {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestEnv} see it</b> * @return a holding this node, completed when the start process is finished */ public Future<ConsulTestNode> start() { Future<ConsulTestNode> ret = Future.newInstance(delegate.start(), fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode.__TYPE_ARG); return ret; }
/** * Create a succeeded future with a null result * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> succeededFuture() { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.succeededFuture(), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Create a failed future with the specified failure cause. * @param t the failure cause as a Throwable * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> failedFuture(Throwable t) { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.failedFuture(t), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Create a failed future with the specified failure cause. * @param t the failure cause as a Throwable * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> failedFuture(Throwable t) { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.failedFuture(t), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Create a failed future with the specified failure message. * @param failureMessage the failure message * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> failedFuture(String failureMessage) { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.failedFuture(failureMessage), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Create a failed future with the specified failure message. * @param failureMessage the failure message * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> failedFuture(String failureMessage) { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.failedFuture(failureMessage), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Create a future that hasn't completed yet * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> future() { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.future(), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Find a node by is name and stop it. This method call {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode#destroy} after {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode#stop} and remove it from the known nodes, so the node can't be used anymore. * @param nodeName the node to stop * @return a {@link io.vertx.rxjava.core.Future} that complete when the node is fully stopped. */ public Future<Void> stopOne(String nodeName) { Future<Void> ret = Future.newInstance(delegate.stopOne(nodeName), io.vertx.lang.rxjava.TypeArg.unknown()); return ret; }
/** * Start a new node. The node is registred among this env nodes, even if the start fail, so you can try to start it again. * @param vertx * @param server is the node in server mode * @param nodeName the node name * @param dataCenter the data center for this node * @return a {@link io.vertx.rxjava.core.Future} holding this node */ public Future<ConsulTestNode> startOne(Vertx vertx, boolean server, String nodeName, String dataCenter) { Future<ConsulTestNode> ret = Future.newInstance(delegate.startOne(vertx.getDelegate(), server, nodeName, dataCenter), fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestNode.__TYPE_ARG); return ret; }
/** * Call {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestEnv#stopOne} on every registered node of this env, sequentially. * @return a {@link io.vertx.rxjava.core.Future} that complete when the nodes are fully stopped with the number of node stopped or fail with a {@link fr.javacrea.vertx.consul.test.utils.rxjava.PartiallyProcessedException} which hold the stopped nodes count. */ public Future<Integer> stopAll() { Future<Integer> ret = Future.newInstance(delegate.stopAll(), io.vertx.lang.rxjava.TypeArg.unknown()); return ret; }
/** * Create a future that hasn't completed yet * @return the future */ public static <T> io.vertx.rxjava.core.Future<T> future() { io.vertx.rxjava.core.Future<T> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.core.Future.future(), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Call {@link fr.javacrea.vertx.consul.test.utils.rxjava.ConsulTestEnv#stopOne} on every node which belong to this data-center, sequentially. * @param dataCenter the data center * @return @return a {@link io.vertx.rxjava.core.Future} that complete when the nodes are fully stopped with the number of node stopped or fail with a {@link fr.javacrea.vertx.consul.test.utils.rxjava.PartiallyProcessedException} which hold the stopped nodes count. */ public Future<Integer> stopAll(String dataCenter) { Future<Integer> ret = Future.newInstance(delegate.stopAll(dataCenter), io.vertx.lang.rxjava.TypeArg.unknown()); return ret; }
/** * Return which connect to the HTTP using the provided node. If there's no node provided, the env should take a random one. * @param node * @param rules * @return the future */ public Future<ConsulClientOptions> clientOptionsForNode(ConsulTestNode node, String rules) { Future<ConsulClientOptions> ret = Future.newInstance(delegate.clientOptionsForNode(node.getDelegate(), rules), io.vertx.lang.rxjava.TypeArg.unknown()); return ret; }
/** * Same as {@link io.vertx.rxjava.config.ConfigRetriever#getConfig}, but returning a object. The result is a * . * @param retriever the config retrieve * @return the future completed when the configuration is retrieved */ public static io.vertx.rxjava.core.Future<JsonObject> getConfigAsFuture(io.vertx.rxjava.config.ConfigRetriever retriever) { io.vertx.rxjava.core.Future<JsonObject> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.config.ConfigRetriever.getConfigAsFuture(retriever.getDelegate()), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Same as {@link io.vertx.rxjava.config.ConfigRetriever#getConfig}, but returning a object. The result is a * . * @param retriever the config retrieve * @return the future completed when the configuration is retrieved */ public static io.vertx.rxjava.core.Future<JsonObject> getConfigAsFuture(io.vertx.rxjava.config.ConfigRetriever retriever) { io.vertx.rxjava.core.Future<JsonObject> ret = io.vertx.rxjava.core.Future.newInstance(io.vertx.config.ConfigRetriever.getConfigAsFuture(retriever.getDelegate()), io.vertx.lang.rx.TypeArg.unknown()); return ret; }
/** * Start many nodes. Nodes are started sequentially, beginning with a server node, to be sure that the join process of the cluster work as expected. Nodes that fails to start are removed from this env nodes list. * @param vertx * @param serverCount the number of server mode nodes * @param clientCount the number of client mode nodes * @param dataCenter the data center for this nodes * @return a {@link io.vertx.rxjava.core.Future} that complete when the nodes are fully started with the number of node started or fail with a {@link fr.javacrea.vertx.consul.test.utils.rxjava.PartiallyProcessedException} which hold the started nodes count. */ public Future<Integer> startMany(Vertx vertx, int serverCount, int clientCount, String dataCenter) { Future<Integer> ret = Future.newInstance(delegate.startMany(vertx.getDelegate(), serverCount, clientCount, dataCenter), io.vertx.lang.rxjava.TypeArg.unknown()); return ret; }