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

io.hyperfoil.tools.qdup.cmd.impl.CtrlSignal Maven / Gradle / Ivy

Go to download

Coordinate multiple terminal shell connections for queuing performance tests and collecting output files

There is a newer version: 0.8.3
Show newest version
package io.hyperfoil.tools.qdup.cmd.impl;

import io.hyperfoil.tools.qdup.cmd.Cmd;
import io.hyperfoil.tools.qdup.cmd.Context;

public class CtrlSignal extends Cmd {

   private final String name;
   private final char signal;

   public CtrlSignal(String name,char signal){
      this.name = name;
      this.signal = signal;
   }

   @Override
   public void run(String input, Context context) {
      context.getSession().ctrl(signal);
      context.next(input); //now waits for shell to return prompt

   }

   @Override
   public Cmd copy() {
      return new CtrlSignal(name,signal);
   }

   @Override
   public String getLogOutput(String output, Context context) {
      return name;
   }

   @Override
   public String toString(){return name;}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy