Class BaseJMSSampler
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.samplers.AbstractSampler
org.apache.jmeter.protocol.jms.sampler.BaseJMSSampler
- All Implemented Interfaces:
- Serializable,- Cloneable,- ConfigMergabilityIndicator,- Searchable,- Sampler,- org.apache.jmeter.testelement.TestElement
- Direct Known Subclasses:
- PublisherSampler,- SubscriberSampler
BaseJMSSampler is an abstract class which provides implementation for common
 properties. Rather than duplicate the code, it's contained in the base class.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidreturn the connection factory parameter used to lookup the connection factory from the JMS serverreturn the destination (topic or queue name)intget the number of samples to aggregateget the number of samples to aggregatemethod returns the initial context factory for jndi initial context lookup.static StringgetMessageHeaders(javax.jms.Message message) Returns a String with the JMS Message Header values.return the password used to login to the jms servermethod returns the provider url for jndi to connect toreturn whether the sampler should store the responsebooleanreturn whether the sampler should store the responsereturn whether the sampler should use properties file instead of UI parameters.booleanreturn the properties as boolean true/false.return the username used to login to the jms serverbooleanreturn whether the sampler should use a static destination.booleanreturn whether jndi requires authenticationabstract SampleResultsample()Obtains statistics about the given Entry, and packages the information into a SampleResult.voidsetConnectionFactory(String factory) set the connection factory forvoidsetDestination(String dest) set the destination (topic or queue name)voidsetDestinationStatic(boolean isStatic) if the sampler should use a static destination, call the method with truevoidsetIterations(String count) set the number of iterations the sampler should aggregatevoidset the initial context factoryvoidsetPassword(String pwd) Set the password to login to the jms servervoidsetProviderUrl(String url) set the provider user for jndivoidsetReadResponse(String read) set whether the sampler should store the response or notvoidsetReconnectionErrorCodes(String reconnectionErrorCodes) voidsetUseAuth(boolean useAuth) Set whether authentication is required for JNDIvoidsetUseJNDIProperties(String properties) if the sampler should use jndi.properties file, call the method with the string "true"voidsetUsername(String user) set the username to login into the jms server if neededMethods inherited from class org.apache.jmeter.samplers.AbstractSamplerappliesMethods inherited from class org.apache.jmeter.testelement.AbstractTestElementaddPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, 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, traversePropertyMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementaddTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getPropertyOrNull, getProps, getSchema, getString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, removeProperty, set, set, set, set, set, set, set, set, set, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
- 
Constructor Details- 
BaseJMSSamplerprotected BaseJMSSampler()
 
- 
- 
Method Details- 
sampleObtains statistics about the given Entry, and packages the information into a SampleResult.- Parameters:
- e- the Entry (TODO seems to be unused)
- Returns:
- information about the sample
 
- 
sample
- 
setJNDIIntialContextFactoryset the initial context factory- Parameters:
- icf- the initial context factory
 
- 
getJNDIInitialContextFactorymethod returns the initial context factory for jndi initial context lookup.- Returns:
- the initial context factory
 
- 
setProviderUrlset the provider user for jndi- Parameters:
- url- the provider URL
 
- 
getProviderUrlmethod returns the provider url for jndi to connect to- Returns:
- the provider URL
 
- 
setConnectionFactoryset the connection factory for- Parameters:
- factory- the connection factory
 
- 
getConnectionFactoryreturn the connection factory parameter used to lookup the connection factory from the JMS server- Returns:
- the connection factory
 
- 
setDestinationset the destination (topic or queue name)- Parameters:
- dest- the destination
 
- 
getDestinationreturn the destination (topic or queue name)- Returns:
- the destination
 
- 
setUsernameset the username to login into the jms server if needed- Parameters:
- user- the name of the user
 
- 
getUsernamereturn the username used to login to the jms server- Returns:
- the username used to login to the jms server
 
- 
setPasswordSet the password to login to the jms server- Parameters:
- pwd- the password to use for login on the jms server
 
- 
getPasswordreturn the password used to login to the jms server- Returns:
- the password used to login to the jms server
 
- 
setIterationsset the number of iterations the sampler should aggregate- Parameters:
- count- the number of iterations
 
- 
getIterationsget the number of samples to aggregate- Returns:
- String containing the number of samples to aggregate
 
- 
getIterationCountpublic int getIterationCount()get the number of samples to aggregate- Returns:
- int containing the number of samples to aggregate
 
- 
setUseAuthpublic void setUseAuth(boolean useAuth) Set whether authentication is required for JNDI- Parameters:
- useAuth- flag whether to use authentication
 
- 
isUseAuthpublic boolean isUseAuth()return whether jndi requires authentication- Returns:
- whether jndi requires authentication
 
- 
setReadResponseset whether the sampler should store the response or not- Parameters:
- read- whether the sampler should store the response or not
 
- 
getReadResponsereturn whether the sampler should store the response- Returns:
- whether the sampler should store the response
 
- 
getReadResponseAsBooleanpublic boolean getReadResponseAsBoolean()return whether the sampler should store the response- Returns:
- boolean: whether the sampler should read the response
 
- 
setUseJNDIPropertiesif the sampler should use jndi.properties file, call the method with the string "true"- Parameters:
- properties- flag whether to use jndi.properties file
 
- 
getUseJNDIPropertiesreturn whether the sampler should use properties file instead of UI parameters.- Returns:
- the string "true" when the sampler should use properties file instead of UI parameters, the string "false" otherwise.
 
- 
getUseJNDIPropertiesAsBooleanpublic boolean getUseJNDIPropertiesAsBoolean()return the properties as boolean true/false.- Returns:
- whether the sampler should use properties file instead of UI parameters.
 
- 
setDestinationStaticpublic void setDestinationStatic(boolean isStatic) if the sampler should use a static destination, call the method with true- Parameters:
- isStatic- flag whether the destination is a static destination
 
- 
isDestinationStaticpublic boolean isDestinationStatic()return whether the sampler should use a static destination.- Returns:
- whether the sampler should use a static destination.
 
- 
getMessageHeadersReturns a String with the JMS Message Header values.- Parameters:
- message- JMS Message
- Returns:
- String with message header values.
 
- 
getReconnectionErrorCodes
- 
setReconnectionErrorCodes
- 
getIsReconnectErrorCode
- 
configureIsReconnectErrorCodeprotected void configureIsReconnectErrorCode()
 
-