# Class MongoScriptSampler

java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.samplers.AbstractSampler
org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler

All Implemented Interfaces:
  `Serializable, Cloneable, ConfigMergabilityIndicator, Searchable, Sampler, TestBean, TestElement`

public class MongoScriptSampler extends AbstractSampler implements TestBean

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DATABASE`
`static final String`
`PASSWORD`
`static final String`
`SCRIPT`
`static final String`
`SOURCE`
`static final String`
`USERNAME`

### Fields inherited from interface TestElement

`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

## Constructor Summary

Constructors
Constructor
Description
`MongoScriptSampler()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getDatabase()`
`String`
`getPassword()`
`String`
`getScript()`
`String`
`getSource()`
`String`
`getTitle()`
`String`
`getUsername()`
`SampleResult`
`sample(Entry e)`
Obtains statistics about the given Entry, and packages the information into a SampleResult.
`void`
`setDatabase(String database)`
`void`
`setPassword(String password)`
`void`
`setScript(String script)`
`void`
`setSource(String source)`
`void`
`setUsername(String username)`

### Methods inherited from class AbstractSampler

`applies`

### Methods inherited from class AbstractTestElement

`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`

### Methods inherited from class Object

`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface 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`

## Field Details

### SOURCE

public static final String SOURCE

See Also:
  - Constant Field Values

### DATABASE

public static final String DATABASE

See Also:
  - Constant Field Values

### USERNAME

public static final String USERNAME

See Also:
  - Constant Field Values

### PASSWORD

public static final String PASSWORD

See Also:
  - Constant Field Values

### SCRIPT

public static final String SCRIPT

See Also:
  - Constant Field Values

## Constructor Details

### MongoScriptSampler

public MongoScriptSampler()

## Method Details

### sample

public SampleResult sample(Entry e)
Description copied from interface: `Sampler`
Obtains statistics about the given Entry, and packages the information into a SampleResult.

Specified by:
  `sample` in interface `Sampler`
Parameters:
  `e` - the Entry (TODO seems to be unused)
Returns:
  information about the sample

### getTitle

public String getTitle()

### getScript

public String getScript()

### setScript

public void setScript(String script)

### getDatabase

public String getDatabase()

### setDatabase

public void setDatabase(String database)

### getUsername

public String getUsername()

### setUsername

public void setUsername(String username)

### getPassword

public String getPassword()

### setPassword

public void setPassword(String password)

### getSource

public String getSource()

### setSource

public void setSource(String source)