Package io.hyperfoil.http.handlers
Class StatusToCounterHandler.Builder
- java.lang.Object
-
- io.hyperfoil.http.handlers.StatusToCounterHandler.Builder
-
- All Implemented Interfaces:
io.hyperfoil.api.config.BuilderBase<StatusHandler.Builder>,StatusHandler.Builder
- Enclosing class:
- StatusToCounterHandler
@MetaInfServices(Builder.class) public static class StatusToCounterHandler.Builder extends java.lang.Object implements StatusHandler.Builder
Counts how many times given status is received.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusToCounterHandler.Builderadd(int add)Number to be added to the session variable.StatusHandlerbuild()StatusToCounterHandler.BuilderexpectStatus(int expectStatus)Expected status (others are ignored).StatusToCounterHandler.Builderinit(int init)Initial value for the session variable.StatusToCounterHandler.Builderset(int set)Do not accumulate (add), just set the variable to this value.StatusToCounterHandler.Buildervar(java.lang.String var)Variable name.
-
-
-
Method Detail
-
expectStatus
public StatusToCounterHandler.Builder expectStatus(int expectStatus)
Expected status (others are ignored). All status codes match by default.- Parameters:
expectStatus- Status code.- Returns:
- Self.
-
var
public StatusToCounterHandler.Builder var(java.lang.String var)
Variable name.- Parameters:
var- Variable name.- Returns:
- Self.
-
init
public StatusToCounterHandler.Builder init(int init)
Initial value for the session variable.- Parameters:
init- Initial value.- Returns:
- Self.
-
add
public StatusToCounterHandler.Builder add(int add)
Number to be added to the session variable.- Parameters:
add- Value.- Returns:
- Self.
-
set
public StatusToCounterHandler.Builder set(int set)
Do not accumulate (add), just set the variable to this value.- Parameters:
set- Value.- Returns:
- Self.
-
build
public StatusHandler build()
- Specified by:
buildin interfaceStatusHandler.Builder
-
-