1 package com.griddynamics.jagger.engine.e1.collector;
3 import com.griddynamics.jagger.coordinator.NodeContext;
5 import java.lang.reflect.Constructor;
6 import java.lang.reflect.InvocationTargetException;
18 private final Class<? extends ResponseValidator<?, ?, ?>> clazz;
29 public ResponseValidator<?, ?, ?>
provide(String sessionId, String taskId, NodeContext kernelContext) {
31 Constructor<? extends ResponseValidator> constructor = clazz.getConstructor(String.class, String.class, NodeContext.class);
32 return constructor.newInstance(taskId, sessionId, kernelContext);
33 }
catch (NoSuchMethodException e) {
34 throw new RuntimeException(e);
35 }
catch (InvocationTargetException e) {
36 throw new RuntimeException(e);
37 }
catch (InstantiationException e) {
38 throw new RuntimeException(e);
39 }
catch (IllegalAccessException e) {
40 throw new RuntimeException(e);