Interface TransportMessageListener

  • All Known Implementing Classes:
    TransportService

    public interface TransportMessageListener
    • Method Detail

      • onRequestReceived

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

        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.
        Parameters:
        requestId - the request ID (unique per client)
        action - the request action
        response - the response send
      • onResponseSent

        default 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.
        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,
                                   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 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 reponse
        context - the response context or null if the context was already processed ie. due to a timeout.