Package org.elasticsearch.transport
Interface TransportMessageListener
- All Known Implementing Classes:
TransportService
public interface TransportMessageListener
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onRequestReceived
(long requestId, String action) Called once a request is receiveddefault void
onRequestSent
(DiscoveryNode node, long requestId, 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, String action, Exception error) Called for every failed action response after the response has been passed to the underlying network implementation.default void
onResponseSent
(long requestId, String action, TransportResponse response) Called for every action response sent after the response has been passed to the underlying network implementation.
-
Field Details
-
NOOP_LISTENER
-
-
Method Details
-
onRequestReceived
Called once a request is received- Parameters:
requestId
- the internal request IDaction
- the request action
-
onResponseSent
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
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, 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
Called for every response received- Parameters:
requestId
- the request id for this responsecontext
- the response context or null if the context was already processed ie. due to a timeout.
-