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
,ConfigMergabilityIndicator
,Searchable
,Interruptible
,Sampler
,org.apache.jmeter.testelement.TestElement
,ThreadListener
A sampler which understands Tcp requests.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement
org.apache.jmeter.testelement.TestElement.Companion
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final boolean
static final String
static final String
static final String
static final String
static final String
static final boolean
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
applies
(ConfigTestElement configElement) Does configElement apply to Samplerint
int
getLabel()
Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txtboolean
int
getPort()
int
int
boolean
Interrupt the current operation if possible.boolean
boolean
Obtains statistics about the given Entry, and packages the information into a SampleResult.void
setClassname
(String classname) void
setCloseConnection
(String close) void
setConnectTimeout
(String newTimeout) void
setEolByte
(String eol) void
setFilename
(String newFilename) void
void
setRequestData
(String newRequestData) void
void
setSoLinger
(String soLinger) void
setTimeout
(String newTimeout) void
Called for each thread after all samples have been processed.void
Called for each thread before starting sampling.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, getPropertyOrNull, 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, toString, wait, wait, wait
Methods inherited from interface org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getPropertyOrNull, getProps, getSchema, getString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, removeProperty, set, set, set, set, set, set, set, set, set, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Field Details
-
SERVER
- See Also:
-
PORT
- See Also:
-
FILENAME
- See Also:
-
CLASSNAME
- See Also:
-
NODELAY
- See Also:
-
TIMEOUT
- See Also:
-
TIMEOUT_CONNECT
- See Also:
-
REQUEST
- See Also:
-
RE_USE_CONNECTION
- See Also:
-
RE_USE_CONNECTION_DEFAULT
public static final boolean RE_USE_CONNECTION_DEFAULT- See Also:
-
CLOSE_CONNECTION
- See Also:
-
CLOSE_CONNECTION_DEFAULT
public static final boolean CLOSE_CONNECTION_DEFAULT- See Also:
-
SO_LINGER
- See Also:
-
EOL_BYTE
- See Also:
-
-
Constructor Details
-
TCPSampler
public TCPSampler()
-
-
Method Details
-
getUsername
-
getPassword
-
setServer
-
getServer
-
isReUseConnection
public boolean isReUseConnection() -
setCloseConnection
-
isCloseConnection
public boolean isCloseConnection() -
setSoLinger
-
getSoLinger
public int getSoLinger() -
setEolByte
-
getEolByte
public int getEolByte() -
setPort
-
getPort
public int getPort() -
setFilename
-
getFilename
-
setRequestData
-
getRequestData
-
setTimeout
-
getTimeout
public int getTimeout() -
setConnectTimeout
-
getConnectTimeout
public int getConnectTimeout() -
getNoDelay
public boolean getNoDelay() -
setClassname
-
getClassname
-
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
Description copied from interface:Sampler
Obtains statistics about the given Entry, and packages the information into a SampleResult. -
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 interfaceThreadListener
-
threadFinished
public void threadFinished()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 interfaceThreadListener
-
applies
Description copied from class:AbstractSampler
Does configElement apply to Sampler- Specified by:
applies
in interfaceConfigMergabilityIndicator
- Overrides:
applies
in classAbstractSampler
- Parameters:
configElement
-ConfigTestElement
- Returns:
- boolean
- See Also:
-
interrupt
public boolean interrupt()Description copied from interface:Interruptible
Interrupt the current operation if possible.- Specified by:
interrupt
in interfaceInterruptible
- Returns:
true
if there was an operation to interrupt.
-