org.apache.kafka.clients
Class ClientResponse
java.lang.Object
org.apache.kafka.clients.ClientResponse
public class ClientResponse
- extends java.lang.Object
A response from the server. Contains both the body of the response as well as the correlated request that was
originally sent.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClientResponse
public ClientResponse(ClientRequest request,
long received,
boolean disconnected,
Struct responseBody)
- Parameters:
request
- The original requestreceived
- The unix timestamp when this response was receiveddisconnected
- Whether the client disconnected before fully reading a responseresponseBody
- The response contents (or null) if we disconnected or no response was expected
receivedTime
public long receivedTime()
wasDisconnected
public boolean wasDisconnected()
request
public ClientRequest request()
responseBody
public Struct responseBody()
hasResponse
public boolean hasResponse()
requestLatencyMs
public long requestLatencyMs()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object