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

io.hyperfoil.api.session.Action Maven / Gradle / Ivy

There is a newer version: 0.27.1
Show newest version
package io.hyperfoil.api.session;

import java.io.Serializable;

import io.hyperfoil.api.config.BuilderBase;
import io.hyperfoil.api.config.ServiceLoadedFactory;

/**
 * Actions are similar to {@link io.hyperfoil.api.config.Step steps} but are executed unconditionally;
 * Action cannot block sequence execution.
 */
public interface Action extends Serializable {
   void run(Session session);

   interface Builder extends BuilderBase {
      Action build();
   }
   interface BuilderFactory extends ServiceLoadedFactory {}

   /**
    * Combination of an action and a step.
    */
   interface Step extends Action, io.hyperfoil.api.config.Step {
      @Override
      default boolean invoke(Session session) {
         run(session);
         return true;
      }
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy