Package org.glassfish.tyrus.servlet
Class TyrusHttpUpgradeHandler
- java.lang.Object
-
- org.glassfish.tyrus.servlet.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
andReadListener
implementation.Reads data from
ServletInputStream
and passes it further to the Tyrus runtime.- Author:
- Jitendra Kotamraju, Pavel Bucek
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FRAME_BUFFER_SIZE
-
Constructor Summary
Constructors Constructor Description TyrusHttpUpgradeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
init(jakarta.servlet.http.WebConnection wc)
void
onAllDataRead()
void
onDataAvailable()
void
onError(java.lang.Throwable t)
void
preInit(WebSocketEngine.UpgradeInfo upgradeInfo, Writer writer, boolean authenticated)
void
sessionDestroyed()
Called when relatedHttpSession
is destroyed or invalidated.void
setIncomingBufferSize(int incomingBufferSize)
java.lang.String
toString()
-
-
-
Field Detail
-
FRAME_BUFFER_SIZE
public static final java.lang.String FRAME_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(jakarta.servlet.http.WebConnection wc)
- Specified by:
init
in interfacejakarta.servlet.http.HttpUpgradeHandler
-
preInit
public void preInit(WebSocketEngine.UpgradeInfo upgradeInfo, Writer writer, boolean authenticated)
-
onDataAvailable
public void onDataAvailable()
- Specified by:
onDataAvailable
in interfacejakarta.servlet.ReadListener
-
onAllDataRead
public void onAllDataRead()
- Specified by:
onAllDataRead
in interfacejakarta.servlet.ReadListener
-
onError
public void onError(java.lang.Throwable t)
- Specified by:
onError
in interfacejakarta.servlet.ReadListener
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejakarta.servlet.http.HttpUpgradeHandler
-
sessionDestroyed
public void sessionDestroyed()
Called when relatedHttpSession
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 classjava.lang.Object
-
setIncomingBufferSize
public void setIncomingBufferSize(int incomingBufferSize)
-
-