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
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(ConfigTestElement configElement) Does configElement apply to SamplerintintgetLabel()Returns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txtbooleanintgetPort()intintbooleanInterrupt the current operation if possible.booleanbooleanObtains statistics about the given Entry, and packages the information into a SampleResult.voidsetClassname(String classname) voidsetCloseConnection(String close) voidsetConnectTimeout(String newTimeout) voidsetEolByte(String eol) voidsetFilename(String newFilename) voidvoidsetRequestData(String newRequestData) voidvoidsetSoLinger(String soLinger) voidsetTimeout(String newTimeout) voidCalled for each thread after all samples have been processed.voidCalled 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, 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
Description copied from interface:SamplerObtains statistics about the given Entry, and packages the information into a SampleResult. -
threadStarted
public void threadStarted()Description copied from interface:ThreadListenerCalled 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:
threadStartedin 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:
threadFinishedin interfaceThreadListener
-
applies
Description copied from class:AbstractSamplerDoes configElement apply to Sampler- Specified by:
appliesin interfaceConfigMergabilityIndicator- Overrides:
appliesin classAbstractSampler- Parameters:
configElement-ConfigTestElement- Returns:
- boolean
- See Also:
-
interrupt
public boolean interrupt()Description copied from interface:InterruptibleInterrupt the current operation if possible.- Specified by:
interruptin interfaceInterruptible- Returns:
trueif there was an operation to interrupt.
-