/** {@inheritDoc} */ @Override public TestElement createTestElement() { BackendListener config = new BackendListener(); modifyTestElement(config); return config; }
/** * Gets the Classname of the BackendListenerClient object * * @return the Classname value */ public String getClassname() { return getPropertyAsString(CLASSNAME); }
/** * Sets the queue size * * @param queueSize the size of the queue */ public void setQueueSize(String queueSize) { setProperty(QUEUE_SIZE, queueSize, DEFAULT_QUEUE_SIZE); }
/** * Get the value of a specific parameter as a String, or null if the value * was not specified. * * @param name * the name of the parameter whose value should be retrieved * @return the value of the parameter, or null if the value was not * specified */ public String getParameter(String name) { return getParameter(name, null); }
@Override public void teardownTest(BackendListenerContext context) throws Exception { if(this.sender.getListSize() > 0) { this.sender.sendRequest(); } this.sender.closeConnection(); super.teardownTest(context); }
@Override public void testEnded() { testEnded("local"); //$NON-NLS-1$ }
@Override public boolean equals(Object other) { if (!(other instanceof ErrorMetric)) { return false; } ErrorMetric otherError = (ErrorMetric) other; return getResponseCode().equalsIgnoreCase(otherError.getResponseCode()) && getResponseMessage().equalsIgnoreCase(otherError.getResponseMessage()); }
@Override public void testStarted() { testStarted("local"); //$NON-NLS-1$ }
private Worker(BackendListenerClient backendListenerClient, Arguments arguments, ListenerClientData listenerClientData){ this.listenerClientData = listenerClientData; // Allow BackendListenerClient implementations to get access to test element name arguments.addArgument(TestElement.NAME, getName()); context = new BackendListenerContext(arguments); this.backendListenerClient = backendListenerClient; }
@Override public Object clone() { LoadosophiaUploader clone = (LoadosophiaUploader) super.clone(); clone.gui = this.gui; return clone; }
/** * Create a new BackendListenerGui as a standalone component. */ public BackendListenerGui() { super(); init(); }
protected SamplerMetric getSamplerMetricInfluxdb(String sampleLabel) { SamplerMetric samplerMetric = metricsPerSampler.get(sampleLabel); if (samplerMetric == null) { samplerMetric = new SamplerMetric(); SamplerMetric oldValue = metricsPerSampler.putIfAbsent(sampleLabel, samplerMetric); if (oldValue != null) { samplerMetric = oldValue; } } return samplerMetric; }
/** * Get the arguments (parameters) for the BackendListenerClient to be executed * with. * * @return the arguments */ public Arguments getArguments() { return (Arguments) getProperty(ARGUMENTS).getObjectValue(); }
@Override public void sampleOccurred(SampleEvent event) { super.sampleOccurred(event); resultCollector.sampleOccurred(event); }
/** * Create a BackendListener. */ public BackendListener() { setArguments(new Arguments()); }
@Override public void testEnded(String host) { super.testEnded(host); isTestStarted.set(false); }
@Override public int hashCode() { return getResponseCode().toLowerCase().hashCode() + getResponseMessage().toLowerCase().hashCode(); }
/** * Gets the queue size * * @return int queueSize */ public String getQueueSize() { return getPropertyAsString(QUEUE_SIZE, DEFAULT_QUEUE_SIZE); } }
/** * Sets the Classname of the BackendListenerClient object * * @param classname * the new Classname value */ public void setClassname(String classname) { setProperty(CLASSNAME, classname); }
@Override public Object clone() { BlazeMeterUploader clone = (BlazeMeterUploader) super.clone(); clone.gui = this.gui; return clone; }