1 package com.griddynamics.jagger.engine.e1.collector;
3 import com.griddynamics.jagger.coordinator.NodeContext;
4 import com.griddynamics.jagger.invoker.v2.JHttpEndpoint;
5 import com.griddynamics.jagger.invoker.v2.JHttpQuery;
6 import com.griddynamics.jagger.invoker.v2.JHttpResponse;
9 import java.util.regex.Pattern;
11 import static com.google.common.collect.Sets.newHashSet;
22 private Set<Integer> validStatusCodes = newHashSet();
24 private Pattern validStatusCodesRegexp;
27 super(taskId, sessionId, kernelContext);
32 return "Default Http Response Status Validator";
48 if (validStatusCodesRegexp != null) {
49 return validStatusCodesRegexp.matcher(result.getStatus().toString()).matches();
51 return validStatusCodes.contains(result.getStatus().value());
55 return validStatusCodes;
59 this.validStatusCodes = validStatusCodes;
63 return validStatusCodesRegexp;
67 this.validStatusCodesRegexp = validStatusCodesRegexp;