Class SubscriberSampler
- All Implemented Interfaces:
- Serializable,- Cloneable,- ConfigMergabilityIndicator,- Searchable,- Interruptible,- Sampler,- org.apache.jmeter.testelement.TestElement,- TestStateListener,- ThreadListener
- 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 TypeMethodDescriptionReturn the client choice.longlongbooleanHandle an interrupt of the test.booleansample()sample method will check which client it should use and call the appropriate client specific sample method.voidsetClientChoice(String choice) Set the client choice.voidsetClientID(String clientId) voidsetDurableSubscriptionId(String durableSubscriptionId) voidsetJmsSelector(String jmsSelector) voidsetPauseBetweenErrors(String pause) voidsetSeparator(String text) Separator for sampler resultsvoidsetStopBetweenSamples(boolean selected) voidsetTimeout(String timeout) voidCalled once for all threads after the end of a test.voidCalled once for all threads after the end of a test.voidCalled just before the start of the test from the main engine thread.voidtestStarted(String host) Called just before the start of the test from the main engine thread.voidClose subscriber.voidthreadFinished(boolean wts) voidInitialise the thread-local variables.voidthreadStarted(boolean wts) Methods inherited from class org.apache.jmeter.protocol.jms.sampler.BaseJMSSamplerconfigureIsReconnectErrorCode, getConnectionFactory, getDestination, getIsReconnectErrorCode, getIterationCount, getIterations, getJNDIInitialContextFactory, getMessageHeaders, getPassword, getProviderUrl, getReadResponse, getReadResponseAsBoolean, getReconnectionErrorCodes, getUseJNDIProperties, getUseJNDIPropertiesAsBoolean, getUsername, isDestinationStatic, isUseAuth, sample, setConnectionFactory, setDestination, setDestinationStatic, setIterations, setJNDIIntialContextFactory, setPassword, setProviderUrl, setReadResponse, setReconnectionErrorCodes, setUseAuth, setUseJNDIProperties, setUsernameMethods 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- 
SubscriberSamplerpublic SubscriberSampler()
 
- 
- 
Method Details- 
samplesample method will check which client it should use and call the appropriate client specific sample method.- Specified by:
- samplein class- BaseJMSSampler
- Returns:
- the appropriate sample result
 
- 
threadStartedpublic void threadStarted()Initialise the thread-local variables.
 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:
- threadStartedin interface- ThreadListener
 
- 
threadStartedpublic void threadStarted(boolean wts) 
- 
threadFinishedpublic void threadFinished()Close subscriber.
 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:
- threadFinishedin interface- ThreadListener
 
- 
threadFinishedpublic void threadFinished(boolean wts) 
- 
interruptpublic boolean interrupt()Handle an interrupt of the test.- Specified by:
- interruptin interface- Interruptible
- Returns:
- trueif there was an operation to interrupt.
 
- 
setClientChoiceSet the client choice. There are two options: ReceiveSusbscriber and OnMessageSubscriber.- Parameters:
- choice- the client to use. One of- RECEIVE_RSCor- ON_MESSAGE_RSC
 
- 
getClientChoiceReturn the client choice.- Returns:
- the client choice, either RECEIVE_RSCorON_MESSAGE_RSC
 
- 
getTimeout
- 
getTimeoutAsLongpublic long getTimeoutAsLong()
- 
setTimeout
- 
getDurableSubscriptionId
- 
getClientId- Returns:
- JMS Client ID
 
- 
getJmsSelector- Returns:
- JMS selector
 
- 
setDurableSubscriptionId
- 
setClientID- Parameters:
- clientId- JMS CLient id
 
- 
setJmsSelector- Parameters:
- jmsSelector- JMS Selector
 
- 
getSeparator- Returns:
- Separator for sampler results
 
- 
setSeparatorSeparator for sampler results- Parameters:
- text- separator to use for sampler results
 
- 
isStopBetweenSamplespublic boolean isStopBetweenSamples()
- 
setStopBetweenSamplespublic void setStopBetweenSamples(boolean selected) 
- 
setPauseBetweenErrors
- 
getPauseBetweenErrors
- 
getPauseBetweenErrorsAsLongpublic long getPauseBetweenErrorsAsLong()
- 
testEndedpublic void testEnded()Called once for all threads after the end of a test. This will use the same element instances as at the start of the test. N.B. testStarted() and testEnded() are called from different threads. - Specified by:
- testEndedin interface- TestStateListener
- See Also:
 
- 
testEndedCalled once for all threads after the end of a test. This will use the same element instances as at the start of the test. N.B. testStarted() and testEnded() are called from different threads. - Specified by:
- testEndedin interface- TestStateListener
- Parameters:
- host- name of host
- See Also:
 
- 
testStartedpublic void testStarted()Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point. N.B. testStarted() and testEnded() are called from different threads. - Specified by:
- testStartedin interface- TestStateListener
- See Also:
 
- 
testStartedCalled just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point. N.B. testStarted() and testEnded() are called from different threads. - Specified by:
- testStartedin interface- TestStateListener
- Parameters:
- host- name of host
- See Also:
 
 
-