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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the charset.byte
Get the end-of-line/end-of-message byte.read
(InputStream is, SampleResult sampleResult) Default implementation callsTCPClient.read(InputStream)
for backward compatibilityvoid
setCharset
(String charset) void
setEolByte
(int eolInt) Set the end-of-line/end-of-message byte.void
Invoked when the thread starts.void
Invoked when the thread ends
-
Field Details
-
eolByte
protected byte eolByte -
useEolByte
protected boolean useEolByte
-
-
Constructor Details
-
AbstractTCPClient
public AbstractTCPClient()
-
-
Method Details
-
getEolByte
public byte getEolByte()Get the end-of-line/end-of-message byte.- Specified by:
getEolByte
in interfaceTCPClient
- Returns:
- Returns the eolByte.
-
setEolByte
public 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:
setEolByte
in interfaceTCPClient
- Parameters:
eolInt
- The value to set
-
setupTest
public void setupTest()Invoked when the thread starts. -
teardownTest
public void teardownTest()Invoked when the thread ends- Specified by:
teardownTest
in interfaceTCPClient
-
getCharset
Description copied from interface:TCPClient
Get the charset.- Specified by:
getCharset
in interfaceTCPClient
- Returns:
- the charset
-
setCharset
- Parameters:
charset
- the charset to set
-
read
Default implementation callsTCPClient.read(InputStream)
for backward compatibility- Specified by:
read
in interfaceTCPClient
- Parameters:
is
- - InputStream for socketsampleResult
-SampleResult
- Returns:
- String read from socket
- Throws:
ReadException
- exception that can contain partial response- See Also:
-