org.apache.jmeter.modifiers

## Class SampleTimeout

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.modifiers.SampleTimeout

All Implemented Interfaces:
  Serializable, Cloneable, Searchable, SampleMonitor, TestElement, ThreadListener

    public class SampleTimeout
    extends AbstractTestElement
    implements Serializable, ThreadListener, SampleMonitor

Sample timeout implementation using Executor threads

Since:
  3.0
See Also:
  Serialized Form

### Field Summary

### Fields inherited from interface org.apache.jmeter.testelement.TestElement

`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

### Constructor Summary

Constructors
Constructor and Description
`SampleTimeout()` No-arg constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getTimeout()` Get the timeout value for display.
`void` `sampleEnded(Sampler sampler)` Will be called when a sample has just finished
`void` `sampleStarting(Sampler sampler)` Will be called when a sample is about to start
`void` `setTimeout(String timeout)` Set the timeout for this timer.
`void` `threadFinished()` Called for each thread after all samples have been processed.
`void` `threadStarted()` Called for each thread before starting sampling.
`String` `toString()` Provide a description of this class.

### Methods inherited from class org.apache.jmeter.testelement.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 java.lang.Object

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

### Methods inherited from interface org.apache.jmeter.testelement.TestElement

`removed`

### Constructor Detail

#### SampleTimeout

    public SampleTimeout()

No-arg constructor.

### Method Detail

#### setTimeout

    public void setTimeout(String timeout)

Set the timeout for this timer.

Parameters:
  `timeout` - The timeout for this timer

#### getTimeout

    public String getTimeout()

Get the timeout value for display.

Returns:
  the timeout value for display.

#### sampleStarting

    public void sampleStarting(Sampler sampler)

Description copied from interface: `SampleMonitor`
Will be called when a sample is about to start

Specified by:
  `sampleStarting` in interface `SampleMonitor`
Parameters:
  `sampler` - sample that will be started

#### sampleEnded

    public void sampleEnded(Sampler sampler)

Description copied from interface: `SampleMonitor`
Will be called when a sample has just finished

Specified by:
  `sampleEnded` in interface `SampleMonitor`
Parameters:
  `sampler` - finished sample

#### threadStarted

    public void threadStarted()

Description copied from interface: `ThreadListener`
Called for each thread before starting sampling. WARNING: this is called before any Config test elements are processed, so any properties they define will not have been merged in yet. See org.apache.jmeter.threads.JMeterThread#threadStarted()

Specified by:
  `threadStarted` in interface `ThreadListener`

#### threadFinished

    public void threadFinished()

Description copied from interface: `ThreadListener`
Called for each thread after all samples have been processed. See org.apache.jmeter.threads.JMeterThread#threadFinished(org.apache.jmeter.engine.event.LoopIterationListener)

Specified by:
  `threadFinished` in interface `ThreadListener`

#### toString

    public String toString()

Provide a description of this class.

Overrides:
  `toString` in class `Object`
Returns:
  the description of this class.