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 SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFieldsModifier 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.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.AbstractTestElementaddPropertiesValues, 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.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementaddTestElement, 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_DEFAULTpublic static final boolean RE_USE_CONNECTION_DEFAULT- See Also:
 
- 
CLOSE_CONNECTION- See Also:
 
- 
CLOSE_CONNECTION_DEFAULTpublic static final boolean CLOSE_CONNECTION_DEFAULT- See Also:
 
- 
SO_LINGER- See Also:
 
- 
EOL_BYTE- See Also:
 
 
- 
- 
Constructor Details- 
TCPSamplerpublic TCPSampler()
 
- 
- 
Method Details- 
getUsername
- 
getPassword
- 
setServer
- 
getServer
- 
isReUseConnectionpublic boolean isReUseConnection()
- 
setCloseConnection
- 
isCloseConnectionpublic boolean isCloseConnection()
- 
setSoLinger
- 
getSoLingerpublic int getSoLinger()
- 
setEolByte
- 
getEolBytepublic int getEolByte()
- 
setPort
- 
getPortpublic int getPort()
- 
setFilename
- 
getFilename
- 
setRequestData
- 
getRequestData
- 
setTimeout
- 
getTimeoutpublic int getTimeout()
- 
setConnectTimeout
- 
getConnectTimeoutpublic int getConnectTimeout()
- 
getNoDelaypublic boolean getNoDelay()
- 
setClassname
- 
getClassname
- 
getLabelReturns a formatted string label describing this sampler Example output: Tcp://Tcp.nowhere.com/pub/README.txt- Returns:
- a formatted string label describing this sampler
 
- 
sampleDescription copied from interface:SamplerObtains statistics about the given Entry, and packages the information into a SampleResult.
- 
threadStartedpublic 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 interface- ThreadListener
 
- 
threadFinishedpublic 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 interface- ThreadListener
 
- 
appliesDescription copied from class:AbstractSamplerDoes configElement apply to Sampler- Specified by:
- appliesin interface- ConfigMergabilityIndicator
- Overrides:
- appliesin class- AbstractSampler
- Parameters:
- configElement-- ConfigTestElement
- Returns:
- boolean
- See Also:
 
- 
interruptpublic boolean interrupt()Description copied from interface:InterruptibleInterrupt the current operation if possible.- Specified by:
- interruptin interface- Interruptible
- Returns:
- trueif there was an operation to interrupt.
 
 
-