org.apache.jmeter.protocol.tcp.sampler

Class TCPSampler

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

public class TCPSampler
extends AbstractSampler
implements ThreadListener

A sampler which understands Tcp requests.

Field Summary

static String
CLASSNAME
static String
FILENAME
static String
NODELAY
static String
PORT
static String
REQUEST
static String
RE_USE_CONNECTION
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
setReUseConnection(String reuse)
void
setRequestData(String newRequestData)
void
setServer(String newServer)
void
setTimeout(String newTimeout)
void
threadFinished()
Called once for each thread at the end of a test
void
threadStarted()
Called just before the start of the thread

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

Field Details

CLASSNAME

public static final String CLASSNAME

FILENAME

public static final String FILENAME

NODELAY

public static final String NODELAY

PORT

public static final String PORT

REQUEST

public static final String REQUEST

RE_USE_CONNECTION

public static final String RE_USE_CONNECTION

SERVER

public static final String SERVER

TIMEOUT

public static final String TIMEOUT

Constructor Details

TCPSampler

public TCPSampler()

Method Details

getClassname

public String getClassname()

getFilename

public String getFilename()

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

getNoDelay

public boolean getNoDelay()

getPassword

public String getPassword()

getPort

public int getPort()

getRequestData

public String getRequestData()

getServer

public String getServer()

getTimeout

public int getTimeout()

getUsername

public String getUsername()

isReUseConnection

public boolean isReUseConnection()

sample

public SampleResult sample(Entry e)
Obtains statistics about the given Entry, and packages the information into a SampleResult.
Specified by:
sample in interface Sampler

setClassname

public void setClassname(String classname)

setFilename

public void setFilename(String newFilename)

setNoDelay

public void setNoDelay(String newNoDelay)

setPort

public void setPort(String newFilename)

setReUseConnection

public void setReUseConnection(String reuse)

setRequestData

public void setRequestData(String newRequestData)

setServer

public void setServer(String newServer)

setTimeout

public void setTimeout(String newTimeout)

threadFinished

public void threadFinished()
Called once for each thread at the end of a test
Specified by:
threadFinished in interface ThreadListener
See Also:
org.apache.jmeter.threads.JMeterThread.threadFinished()

threadStarted

public void threadStarted()
Called just before the start of the thread
Specified by:
threadStarted in interface ThreadListener
See Also:
org.apache.jmeter.threads.JMeterThread.threadStarted()

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