public class MailReaderSampler extends AbstractSampler implements Interruptible
Modifier and Type | Field and Description |
---|---|
static int |
ALL_MESSAGES |
static String |
DEFAULT_PROTOCOL |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
MailReaderSampler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCustomProperties(Properties props) |
boolean |
applies(ConfigTestElement configElement)
Does configElement apply to Sampler
|
boolean |
getDeleteMessages() |
String |
getFolder() |
boolean |
getHeaderOnly() |
int |
getNumMessages() |
String |
getNumMessagesString() |
String |
getPassword() |
String |
getPort() |
String |
getServer() |
String |
getServerType()
Returns the type of the protocol set to use when talking with the remote
server.
|
String |
getTrustStoreToUse() |
String |
getUserName() |
boolean |
interrupt()
Interrupt the current operation if possible.
|
boolean |
isEnforceStartTLS() |
boolean |
isStoreMimeMessage() |
boolean |
isTrustAllCerts() |
boolean |
isUseLocalTrustStore() |
boolean |
isUseSSL() |
boolean |
isUseStartTLS() |
SampleResult |
sample(Entry e)
Obtains statistics about the given Entry, and packages the information
into a SampleResult.
|
void |
setDeleteMessages(boolean delete) |
void |
setFolder(String folder) |
void |
setHeaderOnly(boolean selected) |
void |
setNumMessages(int numMessages) |
void |
setNumMessages(String numMessages) |
void |
setPassword(String password) |
void |
setPort(String port) |
void |
setServer(String server) |
void |
setServerType(String serverType)
Sets the type of protocol to use when talking with the remote mail
server.
|
void |
setStoreMimeMessage(boolean storeMimeMessage) |
void |
setUserName(String username) |
String |
toString() |
addPropertiesValues, 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, traverseProperty
finalize, getClass, notify, notifyAll, wait, wait, wait
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, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
public static final String DEFAULT_PROTOCOL
public static final int ALL_MESSAGES
public boolean isUseLocalTrustStore()
public String getTrustStoreToUse()
public boolean isUseSSL()
public boolean isUseStartTLS()
public boolean isTrustAllCerts()
public boolean isEnforceStartTLS()
public SampleResult sample(Entry e)
protected void addCustomProperties(Properties props)
public void setServerType(String serverType)
serverType
- protocol to usepublic String getServerType()
public void setServer(String server)
server
- -
The name or address of the remote server.public String getServer()
public String getPort()
public void setPort(String port)
public void setUserName(String username)
username
- -
The username of the mail account.public String getUserName()
public void setPassword(String password)
password
- the password to usepublic String getPassword()
public void setFolder(String folder)
folder
- -
Name of the folder to read emails from. "INBOX" is the only
acceptable value if the server type is POP3.public String getFolder()
public void setNumMessages(int numMessages)
numMessages
- -
The number of messages to retrieve from the mail server. Set
this value to -1 to retrieve all messages.public void setNumMessages(String numMessages)
numMessages
- -
The number of messages to retrieve from the mail server. Set
this value to -1 to retrieve all messages.public int getNumMessages()
public String getNumMessagesString()
public void setDeleteMessages(boolean delete)
delete
- -
Whether or not to delete the read messages from the folder.public boolean getDeleteMessages()
public boolean isStoreMimeMessage()
public void setStoreMimeMessage(boolean storeMimeMessage)
storeMimeMessage
- Whether or not to store the retrieved message as MIME message in the
sample resultpublic boolean interrupt()
interrupt
in interface Interruptible
true
if there was an operation to interrupt.public boolean applies(ConfigTestElement configElement)
AbstractSampler
applies
in interface ConfigMergabilityIndicator
applies
in class AbstractSampler
configElement
- ConfigTestElement
AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)
public boolean getHeaderOnly()
public void setHeaderOnly(boolean selected)
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.