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,org.apache.jmeter.engine.util.ConfigMergabilityIndicator,org.apache.jmeter.gui.Searchable,org.apache.jmeter.samplers.Interruptible,org.apache.jmeter.samplers.Sampler,org.apache.jmeter.testelement.TestElement,org.apache.jmeter.testelement.ThreadListener
public class TCPSampler
extends org.apache.jmeter.samplers.AbstractSampler
implements org.apache.jmeter.testelement.ThreadListener, org.apache.jmeter.samplers.Interruptible
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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplies(org.apache.jmeter.config.ConfigTestElement configElement) intintgetLabel()Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txtbooleanintgetPort()intintbooleanbooleanbooleanorg.apache.jmeter.samplers.SampleResultsample(org.apache.jmeter.samplers.Entry e) voidsetClassname(String classname) voidsetCloseConnection(String close) voidsetConnectTimeout(String newTimeout) voidsetEolByte(String eol) voidsetFilename(String newFilename) voidvoidsetRequestData(String newRequestData) voidvoidsetSoLinger(String soLinger) voidsetTimeout(String newTimeout) voidvoidMethods 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, traversePropertyMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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
public org.apache.jmeter.samplers.SampleResult sample(org.apache.jmeter.samplers.Entry e) - Specified by:
samplein interfaceorg.apache.jmeter.samplers.Sampler
-
threadStarted
public void threadStarted()- Specified by:
threadStartedin interfaceorg.apache.jmeter.testelement.ThreadListener
-
threadFinished
public void threadFinished()- Specified by:
threadFinishedin interfaceorg.apache.jmeter.testelement.ThreadListener
-
applies
public boolean applies(org.apache.jmeter.config.ConfigTestElement configElement) - Specified by:
appliesin interfaceorg.apache.jmeter.engine.util.ConfigMergabilityIndicator- Overrides:
appliesin classorg.apache.jmeter.samplers.AbstractSampler- See Also:
-
AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)
-
interrupt
public boolean interrupt()- Specified by:
interruptin interfaceorg.apache.jmeter.samplers.Interruptible
-