Class TyrusHttpUpgradeHandler

  • All Implemented Interfaces:
    jakarta.servlet.http.HttpUpgradeHandler, jakarta.servlet.ReadListener, java.util.EventListener

    public class TyrusHttpUpgradeHandler
    extends java.lang.Object
    implements jakarta.servlet.http.HttpUpgradeHandler, jakarta.servlet.ReadListener
    HttpUpgradeHandler and ReadListener implementation.

    Reads data from ServletInputStream and passes it further to the Tyrus runtime.

    Author:
    Jitendra Kotamraju, Pavel Bucek
    • Field Detail

      • FRAME_BUFFER_SIZE

        public static final java.lang.String FRAME_BUFFER_SIZE
        See Also:
        Constant Field Values
    • Constructor Detail

      • TyrusHttpUpgradeHandler

        public TyrusHttpUpgradeHandler()
    • Method Detail

      • init

        public void init​(jakarta.servlet.http.WebConnection wc)
        Specified by:
        init in interface jakarta.servlet.http.HttpUpgradeHandler
      • onDataAvailable

        public void onDataAvailable()
        Specified by:
        onDataAvailable in interface jakarta.servlet.ReadListener
      • onAllDataRead

        public void onAllDataRead()
        Specified by:
        onAllDataRead in interface jakarta.servlet.ReadListener
      • onError

        public void onError​(java.lang.Throwable t)
        Specified by:
        onError in interface jakarta.servlet.ReadListener
      • destroy

        public void destroy()
        Specified by:
        destroy in interface jakarta.servlet.http.HttpUpgradeHandler
      • sessionDestroyed

        public void sessionDestroyed()
        Called when related HttpSession is destroyed or invalidated.

        Implementation is required to call onClose() on server-side with corresponding close code (1008, see WebSocket spec 7.2) - only when there is an authorized user for this session.

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setIncomingBufferSize

        public void setIncomingBufferSize​(int incomingBufferSize)