Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jmeter.protocol.tcp.sampler
Class TCPSampler

    java.lang.Object
      org.apache.jmeter.testelement.AbstractTestElement
          org.apache.jmeter.samplers.AbstractSampler
              org.apache.jmeter.protocol.tcp.sampler.TCPSampler

All Implemented Interfaces:
  Serializable, Cloneable, Sampler, TestElement, ThreadListener

    public class TCPSampler

extends AbstractSampler
implements ThreadListener

A sampler which understands Tcp requests.

See Also:
  Serialized Form

Field Summary
`static String` | `CLASSNAME`
`static String` | `FILENAME`
`static String` | `NODELAY`
`static String` | `PORT`
`static String` | `RE_USE_CONNECTION`
`static String` | `REQUEST`
`static String` | `SERVER`
`static String` | `TIMEOUT`

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

Constructor Summary
`TCPSampler()`

Method Summary
`String` | `getClassname()`
`String` | `getFilename()`
`String` | `getLabel()` Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txt
`boolean` | `getNoDelay()`
`String` | `getPassword()`
`int` | `getPort()`
`String` | `getRequestData()`
`String` | `getServer()`
`int` | `getTimeout()`
`String` | `getUsername()`
`boolean` | `isReUseConnection()`
`SampleResult` | `sample(Entry e)` Obtains statistics about the given Entry, and packages the information into a SampleResult.
`void` | `setClassname(String classname)`
`void` | `setFilename(String newFilename)`
`void` | `setNoDelay(String newNoDelay)`
`void` | `setPort(String newFilename)`
`void` | `setRequestData(String newRequestData)`
`void` | `setReUseConnection(String reuse)`
`void` | `setServer(String newServer)`
`void` | `setTimeout(String newTimeout)`
`void` | `threadFinished()` Called for each thread after all samples have been processed.
`void` | `threadStarted()` Called for each thread before starting sampling.

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
`addProperty, addTestElement, canRemove, clear, clearTemporary, clone, 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, 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`

Field Detail

### SERVER

    public static final String SERVER

See Also:
  Constant Field Values

### PORT

    public static final String PORT

See Also:
  Constant Field Values

### FILENAME

    public static final String FILENAME

See Also:
  Constant Field Values

### CLASSNAME

    public static final String CLASSNAME

See Also:
  Constant Field Values

### NODELAY

    public static final String NODELAY

See Also:
  Constant Field Values

### TIMEOUT

    public static final String TIMEOUT

See Also:
  Constant Field Values

### REQUEST

    public static final String REQUEST

See Also:
  Constant Field Values

### RE_USE_CONNECTION

    public static final String RE_USE_CONNECTION

See Also:
  Constant Field Values

Constructor Detail

### TCPSampler

    public TCPSampler()

Method Detail

### getUsername

    public String getUsername()

### getPassword

    public String getPassword()

### setServer

    public void setServer(String newServer)

### getServer

    public String getServer()

### setReUseConnection

    public void setReUseConnection(String reuse)

### isReUseConnection

    public boolean isReUseConnection()

### setPort

    public void setPort(String newFilename)

### getPort

    public int getPort()

### setFilename

    public void setFilename(String newFilename)

### getFilename

    public String getFilename()

### setRequestData

    public void setRequestData(String newRequestData)

### getRequestData

    public String getRequestData()

### setTimeout

    public void setTimeout(String newTimeout)

### getTimeout

    public int getTimeout()

### setNoDelay

    public void setNoDelay(String newNoDelay)

### getNoDelay

    public boolean getNoDelay()

### setClassname

    public void setClassname(String classname)

### getClassname

    public String getClassname()

### getLabel

    public String getLabel()

  Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txt

  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`

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

  Specified by:
    `threadStarted` in interface `ThreadListener`
  See Also:
    `JMeterThread.threadStarted()`

### threadFinished

    public void threadFinished()

  Description copied from interface: `ThreadListener`
  Called for each thread after all samples have been processed.

  Specified by:
    `threadFinished` in interface `ThreadListener`
  See Also:
    `JMeterThread.threadFinished()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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