Class AbstractTCPClient
java.lang.Object
org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
- All Implemented Interfaces:
- TCPClient
- Direct Known Subclasses:
- BinaryTCPClientImpl,- TCPClientDecorator,- TCPClientImpl
Basic implementation of TCPClient interface.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGet the charset.byteGet the end-of-line/end-of-message byte.read(InputStream is, SampleResult sampleResult) Default implementation callsTCPClient.read(InputStream)for backward compatibilityvoidsetCharset(String charset) voidsetEolByte(int eolInt) Set the end-of-line/end-of-message byte.voidInvoked when the thread starts.voidInvoked when the thread ends
- 
Field Details- 
eolByteprotected byte eolByte
- 
useEolByteprotected boolean useEolByte
 
- 
- 
Constructor Details- 
AbstractTCPClientpublic AbstractTCPClient()
 
- 
- 
Method Details- 
getEolBytepublic byte getEolByte()Get the end-of-line/end-of-message byte.- Specified by:
- getEolBytein interface- TCPClient
- Returns:
- Returns the eolByte.
 
- 
setEolBytepublic void setEolByte(int eolInt) Set the end-of-line/end-of-message byte. If the value is out of range of a byte, then it is to be ignored.- Specified by:
- setEolBytein interface- TCPClient
- Parameters:
- eolInt- The value to set
 
- 
setupTestpublic void setupTest()Invoked when the thread starts.
- 
teardownTestpublic void teardownTest()Invoked when the thread ends- Specified by:
- teardownTestin interface- TCPClient
 
- 
getCharsetDescription copied from interface:TCPClientGet the charset.- Specified by:
- getCharsetin interface- TCPClient
- Returns:
- the charset
 
- 
setCharset- Parameters:
- charset- the charset to set
 
- 
readDefault implementation callsTCPClient.read(InputStream)for backward compatibility- Specified by:
- readin interface- TCPClient
- Parameters:
- is- - InputStream for socket
- sampleResult-- SampleResult
- Returns:
- String read from socket
- Throws:
- ReadException- exception that can contain partial response
- See Also:
 
 
-