Package org.glassfish.tyrus.servlet
Class TyrusHttpUpgradeHandler
- java.lang.Object
-
- org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler
-
- All Implemented Interfaces:
java.util.EventListener
,javax.servlet.http.HttpUpgradeHandler
,javax.servlet.ReadListener
public class TyrusHttpUpgradeHandler extends java.lang.Object implements javax.servlet.http.HttpUpgradeHandler, javax.servlet.ReadListener
HttpUpgradeHandler
andReadListener
implementation.Reads data from
ServletInputStream
and passes it further to the Tyrus runtime.- Author:
- Jitendra Kotamraju, Pavel Bucek (pavel.bucek at oracle.com)
-
-
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(javax.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(javax.servlet.http.WebConnection wc)
- Specified by:
init
in interfacejavax.servlet.http.HttpUpgradeHandler
-
preInit
public void preInit(WebSocketEngine.UpgradeInfo upgradeInfo, Writer writer, boolean authenticated)
-
onDataAvailable
public void onDataAvailable()
- Specified by:
onDataAvailable
in interfacejavax.servlet.ReadListener
-
onAllDataRead
public void onAllDataRead()
- Specified by:
onAllDataRead
in interfacejavax.servlet.ReadListener
-
onError
public void onError(java.lang.Throwable t)
- Specified by:
onError
in interfacejavax.servlet.ReadListener
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.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)
-
-