Class ExtensionStack

    • Method Detail

      • getNegotiatedExtensions

        public java.util.List<ExtensionConfig> getNegotiatedExtensions()
        Get the list of negotiated extensions, each entry being a full "name; params" extension configuration
        list of negotiated extensions
      • hasNegotiatedExtensions

        public boolean hasNegotiatedExtensions()
      • onFrame

        public void onFrame​(Frame frame,
                            Callback callback)
        Description copied from interface: IncomingFrames
        Process the incoming frame.

        Note: if you need to hang onto any information from the frame, be sure to copy it, as the information contained in the Frame will be released and/or reused by the implementation.

        Specified by:
        onFrame in interface IncomingFrames
        frame - the frame to process
        callback - the read completion
      • negotiate

        public void negotiate​(java.util.List<ExtensionConfig> offeredConfigs,
                              java.util.List<ExtensionConfig> negotiatedConfigs)
        Perform the extension negotiation.

        For the list of negotiated extensions, use getNegotiatedExtensions()

        offeredConfigs - the configurations being requested by the client
        negotiatedConfigs - the configurations accepted by the server
      • sendFrame

        public void sendFrame​(Frame frame,
                              Callback callback,
                              boolean batch)
        Description copied from interface: OutgoingFrames
        A frame, and optional callback, intended for the network layer.

        Note: the frame can undergo many transformations in the various layers and extensions present in the implementation.

        If you are implementing a mutation, you are obliged to handle the incoming WriteCallback appropriately.

        Specified by:
        sendFrame in interface OutgoingFrames
        frame - the frame to eventually write to the network layer.
        callback - the callback to notify when the frame is written.
        batch - the batch mode requested by the sender.
      • getRsv1User

        public Extension getRsv1User()
      • getRsv2User

        public Extension getRsv2User()
      • getRsv3User

        public Extension getRsv3User()
      • isRsv1Used

        public boolean isRsv1Used()
      • isRsv2Used

        public boolean isRsv2Used()
      • isRsv3Used

        public boolean isRsv3Used()
      • dump

        public java.lang.String dump()
        Specified by:
        dump in interface Dumpable
      • dump

        public void dump​(java.lang.Appendable out,
                         java.lang.String indent)
        Description copied from interface: Dumpable
        Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
        Specified by:
        dump in interface Dumpable
        out - The appendable to dump to
        indent - The indent to apply after any new lines.
        Throws: - if unable to write to Appendable
      • dumpSelf

        public java.lang.String dumpSelf()
        Description copied from interface: Dumpable
        The description of this/self found in the dump. Allows for alternative representation of Object other then .toString() where the long form output of toString() is represented in a cleaner way within the dump infrastructure.
        Specified by:
        dumpSelf in interface Dumpable
        the representation of self
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object