@Override public synchronized void setParameters(Collection<CompoundVariable> parameters) throws InvalidVariableException { checkParameterCount(parameters, MIN_PARAMETER_COUNT, MAX_PARAMETER_COUNT); values = parameters.toArray(new CompoundVariable[parameters.size()]); }
@Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String sourceString = values[0].execute(); String decodedValue = new String(Base64.decodeBase64(sourceString)); if (values.length > 1) { String variableName = values[1].execute(); if (variableName.length() > 0) {// Allow for empty name final JMeterVariables variables = getVariables(); if (variables != null) { variables.put(variableName, decodedValue); } } } return decodedValue; }
@Override public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { String sourceString = values[0].execute(); String decodedValue = new String(Base64.decodeBase64(sourceString)); if (values.length > 1) { String variableName = values[1].execute(); if (variableName.length() > 0) {// Allow for empty name final JMeterVariables variables = getVariables(); if (variables != null) { variables.put(variableName, decodedValue); } } } return decodedValue; }
@Override public synchronized void setParameters(Collection<CompoundVariable> parameters) throws InvalidVariableException { checkParameterCount(parameters, MIN_PARAMETER_COUNT, MAX_PARAMETER_COUNT); values = parameters.toArray(new CompoundVariable[parameters.size()]); }