public class PublisherSampler extends BaseJMSSampler implements org.apache.jmeter.testelement.TestStateListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_ENCODING
Encoding value to sent parsed data but read with default system encoding
|
static java.util.Set<java.lang.String> |
NO_ENCODING
Constant for system default encodings
|
static java.lang.String |
RAW_DATA
Encoding value to sent data as is (no variabilisation)
|
| Constructor and Description |
|---|
PublisherSampler() |
| Modifier and Type | Method and Description |
|---|---|
protected static com.github.benmanes.caffeine.cache.Cache<java.lang.Object,java.lang.Object> |
buildCache(java.lang.String configChoice) |
java.lang.String |
getConfigChoice()
return the source of the message Converts from old JMX files which used
the local language string
|
java.lang.String |
getExpiration() |
java.lang.String |
getFileEncoding()
Gets file encoding to use.
|
java.lang.String |
getInputFile() |
JMSProperties |
getJMSProperties() |
java.lang.String |
getMessageChoice() |
java.lang.String |
getPriority() |
java.lang.String |
getRandomPath() |
static java.lang.String[] |
getSupportedEncodings()
Init available encoding using constants, then JVM standard ones
|
java.lang.String |
getTextMessage() |
boolean |
getUseNonPersistentDelivery() |
org.apache.jmeter.samplers.SampleResult |
sample()
The implementation will publish n messages within a for loop.
|
void |
setConfigChoice(java.lang.String choice)
set the source of the message
|
void |
setExpiration(java.lang.String s) |
void |
setFileEncoding(java.lang.String fileEncoding)
Sets file encoding to use.
|
void |
setInputFile(java.lang.String file)
set the input file for the publisher
|
void |
setJMSProperties(JMSProperties jmsProperties) |
void |
setMessageChoice(java.lang.String choice)
set the type of the message
|
void |
setPriority(java.lang.String s) |
void |
setRandomPath(java.lang.String path)
set the random path for the messages
|
void |
setTextMessage(java.lang.String message)
set the text for the message
|
void |
setUseNonPersistentDelivery(boolean value) |
void |
testEnded()
endTest cleans up the client
|
void |
testEnded(java.lang.String host)
the implementation calls testEnded() without any parameters.
|
void |
testStarted() |
void |
testStarted(java.lang.String test)
the implementation calls testStarted() without any parameters.
|
configureIsReconnectErrorCode, 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, setUsernameaddPropertiesValues, 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, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traversepublic static final java.lang.String RAW_DATA
public static final java.lang.String DEFAULT_ENCODING
public static final java.util.Set<java.lang.String> NO_ENCODING
public static java.lang.String[] getSupportedEncodings()
public void testStarted(java.lang.String test)
testStarted in interface org.apache.jmeter.testelement.TestStateListenerpublic void testEnded(java.lang.String host)
testEnded in interface org.apache.jmeter.testelement.TestStateListenerpublic void testEnded()
testEnded in interface org.apache.jmeter.testelement.TestStateListenerpublic void testStarted()
testStarted in interface org.apache.jmeter.testelement.TestStateListenerpublic org.apache.jmeter.samplers.SampleResult sample()
sample in class BaseJMSSamplerprotected static com.github.benmanes.caffeine.cache.Cache<java.lang.Object,java.lang.Object> buildCache(java.lang.String configChoice)
public void setConfigChoice(java.lang.String choice)
choice - source of the messages. One of
JMSPublisherGui.USE_FILE_RSC,
JMSPublisherGui.USE_RANDOM_RSC or
JMSPublisherGui#USE_TEXT_RSCpublic java.lang.String getConfigChoice()
public void setMessageChoice(java.lang.String choice)
choice - type of the message (Text, Object, Map)public java.lang.String getMessageChoice()
public void setInputFile(java.lang.String file)
file - input file for the publisherpublic java.lang.String getInputFile()
public void setRandomPath(java.lang.String path)
path - random path for the messagespublic java.lang.String getRandomPath()
public void setTextMessage(java.lang.String message)
message - text for the messagepublic java.lang.String getTextMessage()
public java.lang.String getExpiration()
public java.lang.String getPriority()
public void setPriority(java.lang.String s)
public void setExpiration(java.lang.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 Propertiespublic java.lang.String getFileEncoding()
RAW_DATA, content isn't parsed.RAW_DATA,
DEFAULT_ENCODING,
getSupportedEncodings()public void setFileEncoding(java.lang.String fileEncoding)
RAW_DATA, content isn't parsed.fileEncoding - File encoding.RAW_DATA,
DEFAULT_ENCODING,
getSupportedEncodings()Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.