Package org.elasticsearch.transport
Interface TransportMessageListener
-
- All Known Implementing Classes:
TransportService
public interface TransportMessageListener
-
-
Method Summary
Modifier and Type Method Description default void
onRequestReceived(long requestId, java.lang.String action)
Called once a request is receiveddefault void
onRequestSent(DiscoveryNode node, long requestId, java.lang.String action, TransportRequest request, TransportRequestOptions finalOptions)
Called for every request sent to a server after the request has been passed to the underlying network implementationdefault void
onResponseReceived(long requestId, Transport.ResponseContext context)
Called for every response receiveddefault void
onResponseSent(long requestId, java.lang.String action, java.lang.Exception error)
Called for every failed action response after the response has been passed to the underlying network implementation.default void
onResponseSent(long requestId, java.lang.String action, TransportResponse response)
Called for every action response sent after the response has been passed to the underlying network implementation.
-
-
-
Method Detail
-
onRequestReceived
default void onRequestReceived(long requestId, java.lang.String action)
Called once a request is received- Parameters:
requestId
- the internal request IDaction
- the request action
-
onResponseSent
default void onResponseSent(long requestId, java.lang.String action, TransportResponse response)
Called for every action response sent after the response has been passed to the underlying network implementation.- Parameters:
requestId
- the request ID (unique per client)action
- the request actionresponse
- the response send
-
onResponseSent
default void onResponseSent(long requestId, java.lang.String action, java.lang.Exception error)
Called for every failed action response after the response has been passed to the underlying network implementation.- Parameters:
requestId
- the request ID (unique per client)action
- the request actionerror
- the error sent back to the caller
-
onRequestSent
default void onRequestSent(DiscoveryNode node, long requestId, java.lang.String action, TransportRequest request, TransportRequestOptions finalOptions)
Called for every request sent to a server after the request has been passed to the underlying network implementation- Parameters:
node
- the node the request was sent torequestId
- the internal request idaction
- the action namerequest
- the actual requestfinalOptions
- the request options
-
onResponseReceived
default void onResponseReceived(long requestId, Transport.ResponseContext context)
Called for every response received- Parameters:
requestId
- the request id for this reponsecontext
- the response context or null if the context was already processed ie. due to a timeout.
-
-