Class ExtensionStack

  • All Implemented Interfaces:
    org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle, IncomingFrames, OutgoingFrames

    @ManagedObject("Extension Stack")
    public class ExtensionStack
    extends org.eclipse.jetty.util.component.ContainerLifeCycle
    implements IncomingFrames, OutgoingFrames
    Represents the stack of Extensions.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

        org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

        org.eclipse.jetty.util.component.LifeCycle.Listener
    • Field Summary

      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
      • Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

        KEY
    • Method Detail

      • configure

        public void configure​(Generator generator)
      • configure

        public void configure​(Parser parser)
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Overrides:
        doStart in class org.eclipse.jetty.util.component.ContainerLifeCycle
        Throws:
        java.lang.Exception
      • dumpSelf

        public java.lang.String dumpSelf()
        Specified by:
        dumpSelf in interface org.eclipse.jetty.util.component.Dumpable
      • getExtensions

        @ManagedAttribute(name="Extension List",
                          readonly=true)
        public java.util.List<Extension> getExtensions()
      • getNegotiatedExtensions

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

        @ManagedAttribute(name="Next Incoming Frames Handler",
                          readonly=true)
        public IncomingFrames getNextIncoming()
      • getNextOutgoing

        @ManagedAttribute(name="Next Outgoing Frames Handler",
                          readonly=true)
        public OutgoingFrames getNextOutgoing()
      • hasNegotiatedExtensions

        public boolean hasNegotiatedExtensions()
      • incomingFrame

        public void incomingFrame​(Frame frame)
        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:
        incomingFrame in interface IncomingFrames
        Parameters:
        frame - the frame to process
      • negotiate

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

        For the list of negotiated extensions, use getNegotiatedExtensions()

        Parameters:
        configs - the configurations being requested
      • outgoingFrame

        public void outgoingFrame​(Frame frame,
                                  WriteCallback callback,
                                  BatchMode batchMode)
        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:
        outgoingFrame in interface OutgoingFrames
        Parameters:
        frame - the frame to eventually write to the network layer.
        callback - the callback to notify when the frame is written.
        batchMode - the batch mode requested by the sender.
      • setNextIncoming

        public void setNextIncoming​(IncomingFrames nextIncoming)
      • setNextOutgoing

        public void setNextOutgoing​(OutgoingFrames nextOutgoing)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.eclipse.jetty.util.component.AbstractLifeCycle