Interface TransportMessageListener

All Known Implementing Classes:
TransportService

public interface TransportMessageListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onRequestReceived​(long requestId,  action)
    Called once a request is received
    default void
    onRequestSent​(DiscoveryNode node, long requestId,  action, TransportRequest request, TransportRequestOptions finalOptions)
    Called for every request sent to a server after the request has been passed to the underlying network implementation
    default void
    onResponseReceived​(long requestId, Transport.ResponseContext context)
    Called for every response received
    default void
    onResponseSent​(long requestId,  action,  error)
    Called for every failed action response after the response has been passed to the underlying network implementation.
    default void
    onResponseSent​(long requestId,  action, TransportResponse response)
    Called for every action response sent after the response has been passed to the underlying network implementation.
  • Field Details

  • Method Details

    • onRequestReceived

      default void onRequestReceived(long requestId,  action)
      Called once a request is received
      Parameters:
      requestId - the internal request ID
      action - the request action
    • onResponseSent

      default void onResponseSent(long requestId,  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 action
      response - the response send
    • onResponseSent

      default void onResponseSent(long requestId,  action,  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 action
      error - the error sent back to the caller
    • onRequestSent

      default void onRequestSent(DiscoveryNode node, long requestId,  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 to
      requestId - the internal request id
      action - the action name
      request - the actual request
      finalOptions - the request options
    • onResponseReceived

      default void onResponseReceived(long requestId, Transport.ResponseContext context)
      Called for every response received
      Parameters:
      requestId - the request id for this response
      context - the response context or null if the context was already processed ie. due to a timeout.