Search in sources :

Example 1 with JMSSampler

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;
}
Also used : JMSSampler(org.apache.jmeter.protocol.jms.sampler.JMSSampler)

Example 2 with JMSSampler

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);
}
Also used : JMSSampler(org.apache.jmeter.protocol.jms.sampler.JMSSampler)

Example 3 with JMSSampler

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());
}
Also used : JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) NullProperty(org.apache.jmeter.testelement.property.NullProperty) BooleanProperty(org.apache.jmeter.testelement.property.BooleanProperty) JMSSampler(org.apache.jmeter.protocol.jms.sampler.JMSSampler)

Aggregations

JMSSampler (org.apache.jmeter.protocol.jms.sampler.JMSSampler)3 BooleanProperty (org.apache.jmeter.testelement.property.BooleanProperty)1 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)1 NullProperty (org.apache.jmeter.testelement.property.NullProperty)1