Class ServerConnectionContinuationHandler

  • All Implemented Interfaces:
    AutoCloseable

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

      • ServerConnectionContinuationHandler

        protected ServerConnectionContinuationHandler​(ServerConnectionContinuation continuation)
        Constructor invoked by your subclass.
        Parameters:
        continuation - continuation to back the handler.
    • Method Detail

      • onContinuationClosed

        protected void onContinuationClosed()
        Implement to handle the onContinuationClosed event. By default, releases the underlying resource by calling close(). If you override this function, be sure to either call close() yourself or invoke super.onContinuationClosed().
      • 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
      • getContinuationClosedFuture

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