Class ClientConnectionContinuationHandler

  • All Implemented Interfaces:
    AutoCloseable

    public abstract class ClientConnectionContinuationHandler
    extends Object
    implements AutoCloseable
    Handler interface for responding to continuation events. It's auto closable. By default, onContinuationClosed() releases the underlying resource.
    • Constructor Detail

      • ClientConnectionContinuationHandler

        public ClientConnectionContinuationHandler()
    • Method Detail

      • onContinuationMessage

        protected abstract void onContinuationMessage​(List<Header> headers,
                                                      byte[] payload,
                                                      MessageType messageType,
                                                      int messageFlags)
        Invoked when a message is received on a continuation.
        Parameters:
        headers - List of EventStream headers for the message received.
        payload - Payload for the message received
        messageType - message type for the message
        messageFlags - message flags for the message
      • onContinuationClosed

        protected void onContinuationClosed()
        By default closes the underlying resource. If you override this function, be sure to either call close() manually or invoke super.onContinuationClosed() before returning.
      • getContinuationClosedFuture

        public CompletableFuture<Void> getContinuationClosedFuture()
        Returns:
        a future that will be completed upon the continuation being closed.