|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.samplers.AbstractSampler
org.apache.jmeter.protocol.jms.sampler.BaseJMSSampler
org.apache.jmeter.protocol.jms.sampler.PublisherSampler
public class PublisherSampler
This class implements the JMS Publisher sampler.
Field Summary |
---|
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
PublisherSampler()
|
Method Summary | |
---|---|
String |
getConfigChoice()
return the source of the message Converts from old JMX files which used the local language string |
String |
getExpiration()
|
String |
getFileContent(String path)
The implementation uses TextFile to load the contents of the file and returns a string. |
String |
getInputFile()
|
JMSProperties |
getJMSProperties()
|
String |
getMessageChoice()
|
String |
getPriority()
|
String |
getRandomPath()
|
String |
getTextMessage()
|
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 |
setExpiration(String s)
|
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 |
setPriority(String s)
|
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. |
Methods inherited from class org.apache.jmeter.protocol.jms.sampler.BaseJMSSampler |
---|
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, setUsername |
Methods inherited from class org.apache.jmeter.samplers.AbstractSampler |
---|
applies |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, 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, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse |
Constructor Detail |
---|
public PublisherSampler()
Method Detail |
---|
public void testStarted(String test)
testStarted
in interface TestStateListener
test
- name of hostStandardJMeterEngine.run()
public void testEnded(String host)
testEnded
in interface TestStateListener
host
- name of hostStandardJMeterEngine.stopTest()
public void testEnded()
testEnded
in interface TestStateListener
StandardJMeterEngine.stopTest()
public void testStarted()
TestStateListener
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.
testStarted
in interface TestStateListener
StandardJMeterEngine.run()
public SampleResult sample()
sample
in class BaseJMSSampler
public String getFileContent(String path)
path
- path to the file to read in
public void setConfigChoice(String choice)
choice
- source of the messages. One of
JMSPublisherGui.USE_FILE_RSC
,
JMSPublisherGui.USE_RANDOM_RSC
or
JMSPublisherGui#USE_TEXT_RSCpublic String getConfigChoice()
public void setMessageChoice(String choice)
choice
- type of the message (Text, Object, Map)public String getMessageChoice()
public void setInputFile(String file)
file
- input file for the publisherpublic String getInputFile()
public void setRandomPath(String path)
path
- random path for the messagespublic String getRandomPath()
public void setTextMessage(String message)
message
- text for the messagepublic String getTextMessage()
public String getExpiration()
public String getPriority()
public void setPriority(String s)
public void setExpiration(String s)
public void setUseNonPersistentDelivery(boolean value)
value
- boolean use NON_PERSISTENTpublic boolean getUseNonPersistentDelivery()
public JMSProperties getJMSProperties()
JMSProperties
JMS Propertiespublic void setJMSProperties(JMSProperties jmsProperties)
jmsProperties
- JMS Properties
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |