use of org.apache.jmeter.protocol.jms.sampler.JMSSampler in project jmeter by apache.
the class JMSSamplerGui method createTestElement.
@Override
public TestElement createTestElement() {
JMSSampler sampler = new JMSSampler();
super.configureTestElement(sampler);
transfer(sampler);
return sampler;
}
use of org.apache.jmeter.protocol.jms.sampler.JMSSampler in project jmeter by apache.
the class JMSSamplerGui method modifyTestElement.
/**
* @param element
* the test element being created
*/
@Override
public void modifyTestElement(TestElement element) {
super.configureTestElement(element);
if (!(element instanceof JMSSampler)) {
return;
}
JMSSampler sampler = (JMSSampler) element;
transfer(sampler);
}
use of org.apache.jmeter.protocol.jms.sampler.JMSSampler in project jmeter by apache.
the class JMSSamplerGui method configure.
@Override
public void configure(TestElement el) {
super.configure(el);
if (!(el instanceof JMSSampler)) {
return;
}
JMSSampler sampler = (JMSSampler) el;
queueConnectionFactory.setText(sampler.getQueueConnectionFactory());
sendQueue.setText(sampler.getSendQueue());
receiveQueue.setText(sampler.getReceiveQueue());
@SuppressWarnings("deprecation") String isOneWay = JMSSampler.IS_ONE_WAY;
// NOSONAR
JMeterProperty oneWay = el.getProperty(isOneWay);
if (oneWay instanceof NullProperty) {
jmsCommunicationStyle.setSelectedIndex(el.getPropertyAsInt(JMSSampler.JMS_COMMUNICATION_STYLE));
} else {
jmsCommunicationStyle.setSelectedIndex(((BooleanProperty) oneWay).getBooleanValue() ? JMSSampler.COMMUNICATION_STYLE.ONE_WAY.getValue() : JMSSampler.COMMUNICATION_STYLE.REQUEST_REPLY.getValue());
}
useNonPersistentDelivery.setSelected(sampler.isNonPersistent());
useReqMsgIdAsCorrelId.setSelected(sampler.isUseReqMsgIdAsCorrelId());
useResMsgIdAsCorrelId.setSelected(sampler.isUseResMsgIdAsCorrelId());
timeout.setText(sampler.getTimeout());
expiration.setText(sampler.getExpiration());
priority.setText(sampler.getPriority());
jmsSelector.setText(sampler.getJMSSelector());
numberOfSamplesToAggregate.setText(sampler.getNumberOfSamplesToAggregate());
messageContent.setInitialText(sampler.getContent());
initialContextFactory.setText(sampler.getInitialContextFactory());
providerUrl.setText(sampler.getContextProvider());
jmsPropertiesPanel.configure(sampler.getJMSProperties());
jndiPropertiesPanel.configure(sampler.getJNDIProperties());
}
Aggregations