Apache JMeter

## org.apache.jmeter.protocol.java.sampler
Class BSFSampler

    java.lang.Object
      org.apache.jmeter.testelement.AbstractTestElement
          org.apache.jmeter.util.BSFTestElement
              org.apache.jmeter.protocol.java.sampler.BSFSampler

All Implemented Interfaces:
  Serializable, Cloneable, Sampler, TestElement

    public class BSFSampler

extends BSFTestElement
implements Sampler

A sampler which understands BSF

See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.apache.jmeter.testelement.TestElement
`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

Constructor Summary
`BSFSampler()`

Method Summary
`String` `getFilename()`
`String` `getLabel()` Returns a formatted string label describing this sampler
`String` `getParameters()`
`String` `getScript()` Return the script (TestBean version).
`String` `getScriptLanguage()`
`SampleResult` `sample(Entry e)` Obtains statistics about the given Entry, and packages the information into a SampleResult.
`void` `setFilename(String newFilename)`
`void` `setParameters(String newScript)`
`void` `setScript(String newScript)` Set the script (TestBean version).
`void` `setScriptLanguage(String lang)`

Methods inherited from class org.apache.jmeter.util.BSFTestElement
`clone, evalFileOrScript, getManager, initManager, processFileOrScript, readResolve`

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

`addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

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, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse`

Constructor Detail

### BSFSampler

    public BSFSampler()

Method Detail

### getFilename

    public String getFilename()

  Overrides:
    `getFilename` in class `BSFTestElement`

### setFilename

    public void setFilename(String newFilename)

  Overrides:
    `setFilename` in class `BSFTestElement`

### getScript

    public String getScript()

  Description copied from class: `BSFTestElement`
  Return the script (TestBean version). Must be overridden for subclasses that don't implement TestBean otherwise the clone() method won't work.

  Overrides:
    `getScript` in class `BSFTestElement`
  Returns:
    the script to execute

### setScript

    public void setScript(String newScript)

  Description copied from class: `BSFTestElement`
  Set the script (TestBean version). Must be overridden for subclasses that don't implement TestBean otherwise the clone() method won't work.

  Overrides:
    `setScript` in class `BSFTestElement`
  Parameters:
    `newScript` - the script to execute (may be blank)

### getParameters

    public String getParameters()

  Overrides:
    `getParameters` in class `BSFTestElement`

### setParameters

    public void setParameters(String newScript)

  Overrides:
    `setParameters` in class `BSFTestElement`

### getScriptLanguage

    public String getScriptLanguage()

  Overrides:
    `getScriptLanguage` in class `BSFTestElement`

### setScriptLanguage

    public void setScriptLanguage(String lang)

  Overrides:
    `setScriptLanguage` in class `BSFTestElement`

### getLabel

    public String getLabel()

  Returns a formatted string label describing this sampler

  Returns:
    a formatted string label describing this sampler

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

Apache JMeter

Copyright © 1998-2011 Apache Software Foundation. All Rights Reserved.