Package io.hyperfoil.http.handlers
Class MultiplexStatusHandler.Builder
- java.lang.Object
-
- io.hyperfoil.http.handlers.MultiplexStatusHandler.Builder
-
- All Implemented Interfaces:
io.hyperfoil.api.config.BuilderBase<StatusHandler.Builder>,io.hyperfoil.api.config.PartialBuilder,StatusHandler.Builder
- Enclosing class:
- MultiplexStatusHandler
@MetaInfServices(Builder.class) public static class MultiplexStatusHandler.Builder extends java.lang.Object implements StatusHandler.Builder, io.hyperfoil.api.config.PartialBuilder
Multiplexes the status based on range into different status handlers.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiplexStatusHandler.Builderadd(java.lang.String range, java.util.List<StatusHandler.Builder> handlers)MultiplexStatusHandlerbuild()ServiceLoadedBuilderProvider<StatusHandler.Builder>withKey(java.lang.String range)Run another handler if the range matches.
-
-
-
Method Detail
-
withKey
public ServiceLoadedBuilderProvider<StatusHandler.Builder> withKey(java.lang.String range)
Run another handler if the range matches. Use range as the key and another status handler in the mapping. Possible values of the status should be separated by commas (,). Ranges can be set using low-high (inclusive) (e.g. 200-299), or replacing lower digits with 'x' (e.g. 2xx).- Specified by:
withKeyin interfaceio.hyperfoil.api.config.PartialBuilder- Parameters:
range- Status range.- Returns:
- Builder
-
add
public MultiplexStatusHandler.Builder add(java.lang.String range, java.util.List<StatusHandler.Builder> handlers)
-
build
public MultiplexStatusHandler build()
- Specified by:
buildin interfaceStatusHandler.Builder
-
-