Class AbstractExtension

  • All Implemented Interfaces:
    org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle, org.eclipse.jetty.websocket.api.extensions.Extension, org.eclipse.jetty.websocket.api.extensions.IncomingFrames, org.eclipse.jetty.websocket.api.extensions.OutgoingFrames
    Direct Known Subclasses:
    CompressExtension, FragmentExtension, FrameCaptureExtension, IdentityExtension

    @ManagedObject("Abstract Extension")
    public abstract class AbstractExtension
    extends org.eclipse.jetty.util.component.AbstractLifeCycle
    implements org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.websocket.api.extensions.Extension
    • 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.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
    • Constructor Detail

      • AbstractExtension

        public AbstractExtension()
    • Method Detail

      • dump

        public String dump()
        Specified by:
        dump in interface org.eclipse.jetty.util.component.Dumpable
      • init

        public void init​(org.eclipse.jetty.websocket.api.WebSocketPolicy policy,
                         org.eclipse.jetty.io.ByteBufferPool bufferPool)
      • getBufferPool

        public org.eclipse.jetty.io.ByteBufferPool getBufferPool()
      • getConfig

        public org.eclipse.jetty.websocket.api.extensions.ExtensionConfig getConfig()
        Specified by:
        getConfig in interface org.eclipse.jetty.websocket.api.extensions.Extension
      • getName

        public String getName()
        Specified by:
        getName in interface org.eclipse.jetty.websocket.api.extensions.Extension
      • getNextIncoming

        @ManagedAttribute(name="Next Incoming Frame Handler",
                          readonly=true)
        public org.eclipse.jetty.websocket.api.extensions.IncomingFrames getNextIncoming()
      • getNextOutgoing

        @ManagedAttribute(name="Next Outgoing Frame Handler",
                          readonly=true)
        public org.eclipse.jetty.websocket.api.extensions.OutgoingFrames getNextOutgoing()
      • getPolicy

        public org.eclipse.jetty.websocket.api.WebSocketPolicy getPolicy()
      • incomingError

        public void incomingError​(Throwable e)
        Specified by:
        incomingError in interface org.eclipse.jetty.websocket.api.extensions.IncomingFrames
      • isRsv1User

        public boolean isRsv1User()
        Used to indicate that the extension makes use of the RSV1 bit of the base websocket framing.

        This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV1.

        Specified by:
        isRsv1User in interface org.eclipse.jetty.websocket.api.extensions.Extension
        Returns:
        true if extension uses RSV1 for its own purposes.
      • isRsv2User

        public boolean isRsv2User()
        Used to indicate that the extension makes use of the RSV2 bit of the base websocket framing.

        This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV2.

        Specified by:
        isRsv2User in interface org.eclipse.jetty.websocket.api.extensions.Extension
        Returns:
        true if extension uses RSV2 for its own purposes.
      • isRsv3User

        public boolean isRsv3User()
        Used to indicate that the extension makes use of the RSV3 bit of the base websocket framing.

        This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV3.

        Specified by:
        isRsv3User in interface org.eclipse.jetty.websocket.api.extensions.Extension
        Returns:
        true if extension uses RSV3 for its own purposes.
      • nextIncomingError

        protected void nextIncomingError​(Throwable e)
      • nextIncomingFrame

        protected void nextIncomingFrame​(org.eclipse.jetty.websocket.api.extensions.Frame frame)
      • nextOutgoingFrame

        protected void nextOutgoingFrame​(org.eclipse.jetty.websocket.api.extensions.Frame frame,
                                         org.eclipse.jetty.websocket.api.WriteCallback callback,
                                         org.eclipse.jetty.websocket.api.BatchMode batchMode)
      • setBufferPool

        public void setBufferPool​(org.eclipse.jetty.io.ByteBufferPool bufferPool)
      • setConfig

        public void setConfig​(org.eclipse.jetty.websocket.api.extensions.ExtensionConfig config)
      • setNextIncomingFrames

        public void setNextIncomingFrames​(org.eclipse.jetty.websocket.api.extensions.IncomingFrames nextIncoming)
        Specified by:
        setNextIncomingFrames in interface org.eclipse.jetty.websocket.api.extensions.Extension
      • setNextOutgoingFrames

        public void setNextOutgoingFrames​(org.eclipse.jetty.websocket.api.extensions.OutgoingFrames nextOutgoing)
        Specified by:
        setNextOutgoingFrames in interface org.eclipse.jetty.websocket.api.extensions.Extension
      • setPolicy

        public void setPolicy​(org.eclipse.jetty.websocket.api.WebSocketPolicy policy)
      • toString

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