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

io.hyperfoil.cli.commands.Shutdown Maven / Gradle / Ivy

There is a newer version: 0.27.1
Show newest version
package io.hyperfoil.cli.commands;

import org.aesh.command.CommandDefinition;
import org.aesh.command.CommandException;
import org.aesh.command.CommandResult;
import org.aesh.command.option.Option;

import io.hyperfoil.cli.context.HyperfoilCommandInvocation;

@CommandDefinition(name = "shutdown", description = "Terminate the controller")
public class Shutdown extends ServerCommand {
   @Option(description = "If true, terminate even if a run is in progress.")
   public boolean force;

   @Override
   public CommandResult execute(HyperfoilCommandInvocation invocation) throws CommandException {
      ensureConnection(invocation);
      invocation.context().client().shutdown(force);
      return CommandResult.SUCCESS;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy