Interface StreamListener

    • Method Detail

      • messagesAvailable

        void messagesAvailable​(StreamListener.MessageProducer producer)
        Called upon receiving a message from the remote end-point.

        Implementations must eventually drain the provided producer StreamListener.MessageProducer completely by invoking StreamListener.MessageProducer.next() to obtain deframed messages until the producer returns null.

        This method should return quickly, as the same thread may be used to process other streams.

        Parameters:
        producer - supplier of deframed messages.
      • onReady

        void onReady()
        This indicates that the transport is now capable of sending additional messages without requiring excessive buffering internally. This event is just a suggestion and the application is free to ignore it, however doing so may result in excessive buffering within the transport.