protected void processConnectors() { for (JMXMonSampler sampler : jmxMonSamplers) { sampler.generateSamples(this); } }
/** * Try to get a connection to the specified jmx url * @param jmxUrl the jmx url * @param attributes jmx connection attributes * @return a jmx connection */ public MBeanServerConnection getConnection(String jmxUrl, Hashtable attributes) { return getConnection(jmxUrl, attributes, false); }
public JMeterProperty getSamplerSettings() { return getProperty(DATA_PROPERTY); }
@Override public void generateSample(double value, String label) { JMXMonSampleResult res = new JMXMonSampleResult(); res.setSampleLabel(label); res.setValue(value); res.setSuccessful(true); SampleEvent e = new SampleEvent(res, JMXMON); jmxMonSampleOccurred(e); }
protected void initiateConnector(Hashtable attributes, String jmxUrl, String name, boolean delta, String objectName, String attribute, String key, boolean canRetry) throws IOException { if (!canRetry && pool.getConnection(jmxUrl, attributes, true) == null) return; jmxMonSamplers.add(new JMXMonSampler(pool, attributes, jmxUrl, name, objectName, attribute, key, delta, canRetry)); }
public void setValue(double value) { setStartTime(ts); setResponseMessage(new Double(value).toString()); }
/** * Try to get a connection to the specified jmx url * @param jmxUrl the jmx url * @param attributes jmx connection attributes * @param wait if true wait the current thread until the end of the connection attempt * @return a jmx connection */ public MBeanServerConnection getConnection(String jmxUrl, Hashtable attributes, boolean wait) { JMXMonConnection connection = (JMXMonConnection)pool.get(jmxUrl); if (connection == null) { connection = new JMXMonConnection(jmxUrl); pool.put(jmxUrl, connection); } return connection.connect(attributes, wait); }
public void setData(CollectionProperty rows) { setProperty(rows); }
/** * Allow external class to notify the pool that the connection identified by the provided * jmx url is closed/in error * @param url the jmx url */ public void notifyConnectionDirty(String url) { JMXMonConnection connection = (JMXMonConnection)pool.get(url); if (connection != null){ connection.setNewActiveConnection(null, null); } }
@Override public void setResponseMessage(String msg) { super.setResponseMessage(msg); setStartTime(ts); }
/** * Check if a connection already exists if true it will return the * existing connection else it will attempt a new connection * @param attributes jmx connection attributes * @param wait if true wait the current thread until the end of the connection attempt * @return a jmx connection or null */ protected MBeanServerConnection connect(Hashtable attributes, boolean wait) { if (connection != null){ log.debug("Reused the same connection for url = " + jmxUrl); return connection; } if (!connectionAttemptFlag) tryConnect(attributes, wait); return connection; }
@Override public void generateSample(double value, String label) { JMXMonSampleResult res = new JMXMonSampleResult(); res.setSampleLabel(label); res.setValue(value); res.setSuccessful(true); SampleEvent e = new SampleEvent(res, JMXMON); jmxMonSampleOccurred(e); } }
protected void initiateConnector(Hashtable attributes, JMeterProperty jmxUrl, String name, boolean delta, String objectName, String attribute, String key, boolean canRetry) throws IOException { if (!canRetry && pool.getConnection(jmxUrl.getStringValue(), attributes, true) == null) return; jmxMonSamplers.add(new JMXMonSampler(this, pool, attributes, jmxUrl, name, objectName, attribute, key, delta, canRetry)); }
public void setValue(double value) { setStartTime(ts); setResponseMessage(new Double(value).toString()); }
protected void processConnectors() { for (JMXMonSampler sampler : jmxMonSamplers) { sampler.generateSamples(this); } }
/** * Try to get a connection to the specified jmx url * @param jmxUrl the jmx url * @param attributes jmx connection attributes * @return a jmx connection */ public MBeanServerConnection getConnection(String jmxUrl, Hashtable attributes) { return getConnection(jmxUrl, attributes, false); }
public JMeterProperty getSamplerSettings() { return getProperty(DATA_PROPERTY); }
public void setData(CollectionProperty rows) { setProperty(rows); }
/** * Allow external class to notify the pool that the connection identified by the provided * jmx url is closed/in error * @param url the jmx url */ public void notifyConnectionDirty(String url) { JMXMonConnection connection = (JMXMonConnection)pool.get(url); if (connection != null){ connection.setNewActiveConnection(null, null); } }
@Override public void setResponseMessage(String msg) { super.setResponseMessage(msg); setStartTime(ts); }