Class MailReaderSampler
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.samplers.AbstractSampler
org.apache.jmeter.protocol.mail.sampler.MailReaderSampler
- All Implemented Interfaces:
- Serializable,- Cloneable,- ConfigMergabilityIndicator,- Searchable,- Interruptible,- Sampler,- org.apache.jmeter.testelement.TestElement
Sampler that can read from POP3 and IMAP mail servers
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFieldsFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddCustomProperties(Properties props) booleanapplies(ConfigTestElement configElement) Does configElement apply to SamplerbooleanbooleanintgetPort()Returns the type of the protocol set to use when talking with the remote server.booleanInterrupt the current operation if possible.booleanbooleanbooleanbooleanbooleanisUseSSL()booleanObtains statistics about the given Entry, and packages the information into a SampleResult.voidsetDeleteMessages(boolean delete) voidvoidsetHeaderOnly(boolean selected) voidsetNumMessages(int numMessages) voidsetNumMessages(String numMessages) voidsetPassword(String password) voidvoidvoidsetServerType(String serverType) Sets the type of protocol to use when talking with the remote mail server.voidsetStoreMimeMessage(boolean storeMimeMessage) voidsetUserName(String username) toString()Methods 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, 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
- 
Field Details- 
DEFAULT_PROTOCOL- See Also:
 
- 
ALL_MESSAGESpublic static final int ALL_MESSAGES- See Also:
 
 
- 
- 
Constructor Details- 
MailReaderSamplerpublic MailReaderSampler()
 
- 
- 
Method Details- 
isUseLocalTrustStorepublic boolean isUseLocalTrustStore()
- 
getTrustStoreToUse
- 
isUseSSLpublic boolean isUseSSL()
- 
isUseStartTLSpublic boolean isUseStartTLS()
- 
isTrustAllCertspublic boolean isTrustAllCerts()
- 
isEnforceStartTLSpublic boolean isEnforceStartTLS()
- 
sampleObtains statistics about the given Entry, and packages the information into a SampleResult.
- 
addCustomProperties
- 
setServerTypeSets the type of protocol to use when talking with the remote mail server. Either MailReaderSampler.TYPE_IMAP[S] or MailReaderSampler.TYPE_POP3[S]. Default is MailReaderSampler.TYPE_POP3.- Parameters:
- serverType- protocol to use
 
- 
getServerTypeReturns the type of the protocol set to use when talking with the remote server. Either MailReaderSampler.TYPE_IMAP[S] or MailReaderSampler.TYPE_POP3[S].- Returns:
- Server Type
 
- 
setServer- Parameters:
- server- - The name or address of the remote server.
 
- 
getServer- Returns:
- The name or address of the remote server.
 
- 
getPort
- 
setPort
- 
setUserName- Parameters:
- username- - The username of the mail account.
 
- 
getUserName- Returns:
- The username of the mail account.
 
- 
setPassword- Parameters:
- password- the password to use
 
- 
getPassword- Returns:
- password
 
- 
setFolder- Parameters:
- folder- - Name of the folder to read emails from. "INBOX" is the only acceptable value if the server type is POP3.
 
- 
getFolder- Returns:
- folder
 
- 
setNumMessagespublic void setNumMessages(int numMessages) - Parameters:
- numMessages- - The number of messages to retrieve from the mail server. Set this value to -1 to retrieve all messages.
 
- 
setNumMessages- Parameters:
- numMessages- - The number of messages to retrieve from the mail server. Set this value to -1 to retrieve all messages.
 
- 
getNumMessagespublic int getNumMessages()- Returns:
- The number of messages to retrieve from the mail server. -1 denotes get all messages.
 
- 
getNumMessagesString- Returns:
- The number of messages to retrieve from the mail server. -1 denotes get all messages.
 
- 
setDeleteMessagespublic void setDeleteMessages(boolean delete) - Parameters:
- delete- - Whether or not to delete the read messages from the folder.
 
- 
getDeleteMessagespublic boolean getDeleteMessages()- Returns:
- Whether or not to delete the read messages from the folder.
 
- 
isStoreMimeMessagepublic boolean isStoreMimeMessage()- Returns:
- Whether or not to store the retrieved message as MIME message in the sample result
 
- 
setStoreMimeMessagepublic void setStoreMimeMessage(boolean storeMimeMessage) - Parameters:
- storeMimeMessage- Whether or not to store the retrieved message as MIME message in the sample result
 
- 
toString
- 
interruptpublic boolean interrupt()Interrupt the current operation if possible.- Specified by:
- interruptin interface- Interruptible
- Returns:
- trueif there was an operation to interrupt.
 
- 
appliesDescription copied from class:AbstractSamplerDoes configElement apply to Sampler- Specified by:
- appliesin interface- ConfigMergabilityIndicator
- Overrides:
- appliesin class- AbstractSampler
- Parameters:
- configElement-- ConfigTestElement
- Returns:
- boolean
- See Also:
 
- 
getHeaderOnlypublic boolean getHeaderOnly()
- 
setHeaderOnlypublic void setHeaderOnly(boolean selected) 
 
-