public class TyrusHttpUpgradeHandler extends Object implements javax.servlet.http.HttpUpgradeHandler, javax.servlet.ReadListener
HttpUpgradeHandler
and ReadListener
implementation.
Reads data from ServletInputStream
and passes it further to the Tyrus runtime.Modifier and Type | Field and Description |
---|---|
static String |
FRAME_BUFFER_SIZE |
Constructor and Description |
---|
TyrusHttpUpgradeHandler() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
init(javax.servlet.http.WebConnection wc) |
void |
onAllDataRead() |
void |
onDataAvailable() |
void |
onError(Throwable t) |
void |
preInit(WebSocketEngine.UpgradeInfo upgradeInfo,
Writer writer,
boolean authenticated) |
void |
sessionDestroyed()
Called when related
HttpSession is destroyed or invalidated. |
void |
setIncomingBufferSize(int incomingBufferSize) |
String |
toString() |
public static final String FRAME_BUFFER_SIZE
public void init(javax.servlet.http.WebConnection wc)
init
in interface javax.servlet.http.HttpUpgradeHandler
public void preInit(WebSocketEngine.UpgradeInfo upgradeInfo, Writer writer, boolean authenticated)
public void onDataAvailable()
onDataAvailable
in interface javax.servlet.ReadListener
public void onAllDataRead()
onAllDataRead
in interface javax.servlet.ReadListener
public void onError(Throwable t)
onError
in interface javax.servlet.ReadListener
public void destroy()
destroy
in interface javax.servlet.http.HttpUpgradeHandler
public void sessionDestroyed()
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.public void setIncomingBufferSize(int incomingBufferSize)
Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.