public class PublisherSampler extends BaseJMSSampler implements TestStateListener
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS| Constructor and Description |
|---|
PublisherSampler() |
| Modifier and Type | Method and Description |
|---|---|
String |
getConfigChoice()
return the source of the message
Converts from old JMX files which used the local language string
|
String |
getFileContent(String path)
The implementation uses TextFile to load the contents of the file and
returns a string.
|
String |
getInputFile()
return the path of the input file
|
JMSProperties |
getJMSProperties() |
String |
getMessageChoice()
return the type of the message (Text, Object, Map)
|
String |
getRandomPath()
return the random path for messages
|
String |
getTextMessage()
return the text for the message
|
boolean |
getUseNonPersistentDelivery() |
SampleResult |
sample()
The implementation will publish n messages within a for loop.
|
void |
setConfigChoice(String choice)
set the source of the message
|
void |
setInputFile(String file)
set the input file for the publisher
|
void |
setJMSProperties(JMSProperties jmsProperties) |
void |
setMessageChoice(String choice)
set the type of the message
|
void |
setRandomPath(String path)
set the random path for the messages
|
void |
setTextMessage(String message)
set the text for the message
|
void |
setUseNonPersistentDelivery(boolean value) |
void |
testEnded()
endTest cleans up the client
|
void |
testEnded(String host)
the implementation calls testEnded() without any parameters.
|
void |
testStarted()
Called just before the start of the test from the main engine thread.
|
void |
testStarted(String test)
the implementation calls testStarted() without any parameters.
|
getConnectionFactory, getDestination, getIterationCount, getIterations, getJNDIInitialContextFactory, getMessageHeaders, getPassword, getProviderUrl, getReadResponse, getReadResponseAsBoolean, getUseJNDIProperties, getUseJNDIPropertiesAsBoolean, getUsername, isDestinationStatic, isUseAuth, sample, setConnectionFactory, setDestination, setDestinationStatic, setIterations, setJNDIIntialContextFactory, setPassword, setProviderUrl, setReadResponse, setUseAuth, setUseJNDIProperties, setUsernameappliesaddPropertiesValues, 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, traversePropertyfinalize, getClass, notify, notifyAll, toString, wait, wait, waitaddTestElement, canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traversepublic void testStarted(String test)
testStarted in interface TestStateListenertest - name of hostStandardJMeterEngine.run()public void testEnded(String host)
testEnded in interface TestStateListenerhost - name of hostStandardJMeterEngine.stopTest()public void testEnded()
testEnded in interface TestStateListenerStandardJMeterEngine.stopTest()public void testStarted()
TestStateListenerCalled 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.
testStarted in interface TestStateListenerStandardJMeterEngine.run()public SampleResult sample()
sample in class BaseJMSSamplerpublic String getFileContent(String path)
path - public void setConfigChoice(String choice)
choice - public String getConfigChoice()
public void setMessageChoice(String choice)
choice - public String getMessageChoice()
public void setInputFile(String file)
file - public String getInputFile()
public void setRandomPath(String path)
path - public String getRandomPath()
public void setTextMessage(String message)
message - public String getTextMessage()
public void setUseNonPersistentDelivery(boolean value)
value - boolean use NON_PERSISTENTpublic boolean getUseNonPersistentDelivery()
public JMSProperties getJMSProperties()
JMSProperties JMS Propertiespublic void setJMSProperties(JMSProperties jmsProperties)
jmsProperties - JMS PropertiesCopyright © 1998-2015 Apache Software Foundation. All Rights Reserved.