org.apache.jmeter.protocol.jms.sampler

## Class JMSSampler

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.samplers.AbstractSampler
    - - org.apache.jmeter.protocol.jms.sampler.JMSSampler

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, ConfigMergabilityIndicator, Searchable, Sampler, TestElement, ThreadListener

      public class JMSSampler
      extends AbstractSampler
      implements ThreadListener

  This class implements the JMS Point-to-Point sampler
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JMSSampler.COMMUNICATION_STYLE`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `IS_ONE_WAY` Deprecated. since 4.0 replaced by JMS_COMMUNICATION_STYLE
    `static java.lang.String` | `JMS_COMMUNICATION_STYLE`

    - ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JMSSampler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Arguments` | `getArguments(java.lang.String name)`
    `int` | `getCommunicationstyle()`
    `java.lang.String` | `getCommunicationstyleString()`
    `java.lang.String` | `getContent()`
    `java.lang.String` | `getContextProvider()`
    `java.lang.String` | `getExpiration()`
    `java.lang.String` | `getInitialContextFactory()`
    `JMSProperties` | `getJMSProperties()`
    `java.lang.String` | `getJMSSelector()`
    `Arguments` | `getJNDIProperties()`
    `java.lang.String` | `getNumberOfSamplesToAggregate()`
    `java.lang.String` | `getPriority()`
    `java.lang.String` | `getQueueConnectionFactory()`
    `java.lang.String` | `getReceiveQueue()`
    `java.lang.String` | `getSendQueue()`
    `java.lang.String` | `getTimeout()`
    `boolean` | `isBrowse()`
    `boolean` | `isClearQueue()`
    `boolean` | `isNonPersistent()`
    `boolean` | `isOneway()`
    `boolean` | `isRead()`
    `boolean` | `isUseReqMsgIdAsCorrelId()` Which request field to use for correlation?
    `boolean` | `isUseResMsgIdAsCorrelId()` Which response field to use for correlation?
    `SampleResult` | `sample(Entry entry)` Obtains statistics about the given Entry, and packages the information into a SampleResult.
    `void` | `setArguments(Arguments args)`
    `void` | `setCommunicationstyle(int communicationStyle)`
    `void` | `setContent(java.lang.String content)`
    `void` | `setContextProvider(java.lang.String string)`
    `void` | `setExpiration(java.lang.String s)`
    `void` | `setInitialContextFactory(java.lang.String string)`
    `void` | `setIsOneway(boolean isOneway)`
    `void` | `setJMSProperties(JMSProperties jmsProperties)`
    `void` | `setJMSSelector(java.lang.String selector)`
    `void` | `setJNDIProperties(Arguments args)`
    `void` | `setNonPersistent(boolean value)`
    `void` | `setNumberOfSamplesToAggregate(java.lang.String selector)`
    `void` | `setPriority(java.lang.String s)`
    `void` | `setQueueConnectionFactory(java.lang.String qcf)`
    `void` | `setReceiveQueue(java.lang.String name)`
    `void` | `setSendQueue(java.lang.String name)`
    `void` | `setTimeout(java.lang.String s)`
    `void` | `setUseReqMsgIdAsCorrelId(boolean value)`
    `void` | `setUseResMsgIdAsCorrelId(boolean value)`
    `void` | `threadFinished()` Called for each thread after all samples have been processed.
    `void` | `threadStarted()` Called for each thread before starting sampling.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.jmeter.samplers.AbstractSampler

      `applies`

    - ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

      `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

      `addTestElement, canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse`

- - ### Field Detail

    - #### IS_ONE_WAY

          @Deprecated
          public static final java.lang.String IS_ONE_WAY

      Deprecated. since 4.0 replaced by JMS_COMMUNICATION_STYLE
      See Also:
        Constant Field Values

    - #### JMS_COMMUNICATION_STYLE

          public static final java.lang.String JMS_COMMUNICATION_STYLE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JMSSampler

          public JMSSampler()

  - ### Method Detail

    - #### sample

          public SampleResult sample(Entry entry)

      Obtains statistics about the given Entry, and packages the information into a SampleResult.
      Specified by:
        `sample` in interface `Sampler`
      Parameters:
        `entry` - the Entry (TODO seems to be unused)
      Returns:
        information about the sample

    - #### getJMSProperties

          public JMSProperties getJMSProperties()

      Returns:
        `JMSProperties` JMS Properties

    - #### setJMSProperties

          public void setJMSProperties(JMSProperties jmsProperties)

      Parameters:
        `jmsProperties` - JMS Properties

    - #### getJNDIProperties

          public Arguments getJNDIProperties()

    - #### setJNDIProperties

          public void setJNDIProperties(Arguments args)

    - #### getQueueConnectionFactory

          public java.lang.String getQueueConnectionFactory()

    - #### setQueueConnectionFactory

          public void setQueueConnectionFactory(java.lang.String qcf)

    - #### getSendQueue

          public java.lang.String getSendQueue()

    - #### setSendQueue

          public void setSendQueue(java.lang.String name)

    - #### getReceiveQueue

          public java.lang.String getReceiveQueue()

    - #### setReceiveQueue

          public void setReceiveQueue(java.lang.String name)

    - #### getContent

          public java.lang.String getContent()

    - #### setContent

          public void setContent(java.lang.String content)

    - #### isOneway

          public boolean isOneway()

    - #### isRead

          public boolean isRead()

    - #### isBrowse

          public boolean isBrowse()

    - #### isClearQueue

          public boolean isClearQueue()

    - #### isNonPersistent

          public boolean isNonPersistent()

    - #### isUseReqMsgIdAsCorrelId

          public boolean isUseReqMsgIdAsCorrelId()

      Which request field to use for correlation?
      Returns:
        true if correlation should use the request JMSMessageID rather than JMSCorrelationID

    - #### isUseResMsgIdAsCorrelId

          public boolean isUseResMsgIdAsCorrelId()

      Which response field to use for correlation?
      Returns:
        true if correlation should use the response JMSMessageID rather than JMSCorrelationID

    - #### getInitialContextFactory

          public java.lang.String getInitialContextFactory()

    - #### getContextProvider

          public java.lang.String getContextProvider()

    - #### getCommunicationstyle

          public int getCommunicationstyle()

    - #### getCommunicationstyleString

          public java.lang.String getCommunicationstyleString()

    - #### setCommunicationstyle

          public void setCommunicationstyle(int communicationStyle)

    - #### setIsOneway

          public void setIsOneway(boolean isOneway)

    - #### setNonPersistent

          public void setNonPersistent(boolean value)

    - #### setUseReqMsgIdAsCorrelId

          public void setUseReqMsgIdAsCorrelId(boolean value)

    - #### setUseResMsgIdAsCorrelId

          public void setUseResMsgIdAsCorrelId(boolean value)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### threadStarted

          public void threadStarted()

      Description copied from interface: `ThreadListener`
      Called for each thread before starting sampling. WARNING: this is called before any Config test elements are processed, so any properties they define will not have been merged in yet. See org.apache.jmeter.threads.JMeterThread#threadStarted()
      Specified by:
        `threadStarted` in interface `ThreadListener`

    - #### getTimeout

          public java.lang.String getTimeout()

    - #### getExpiration

          public java.lang.String getExpiration()

    - #### getPriority

          public java.lang.String getPriority()

    - #### threadFinished

          public void threadFinished()

      Called for each thread after all samples have been processed. See org.apache.jmeter.threads.JMeterThread#threadFinished(org.apache.jmeter.engine.event.LoopIterationListener)
      Specified by:
        `threadFinished` in interface `ThreadListener`

    - #### setArguments

          public void setArguments(Arguments args)

    - #### getArguments

          public Arguments getArguments(java.lang.String name)

    - #### setTimeout

          public void setTimeout(java.lang.String s)

    - #### setPriority

          public void setPriority(java.lang.String s)

    - #### setExpiration

          public void setExpiration(java.lang.String s)

    - #### getJMSSelector

          public java.lang.String getJMSSelector()

      Returns:
        String JMS Selector

    - #### setJMSSelector

          public void setJMSSelector(java.lang.String selector)

      Parameters:
        `selector` - String selector

    - #### getNumberOfSamplesToAggregate

          public java.lang.String getNumberOfSamplesToAggregate()

    - #### setNumberOfSamplesToAggregate

          public void setNumberOfSamplesToAggregate(java.lang.String selector)

    - #### setInitialContextFactory

          public void setInitialContextFactory(java.lang.String string)

      Parameters:
        `string` - name of the initial context factory to use

    - #### setContextProvider

          public void setContextProvider(java.lang.String string)

      Parameters:
        `string` - url of the provider

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.