Class WsFrameServer
java.lang.Object
org.apache.tomcat.websocket.WsFrameBase
org.apache.tomcat.websocket.server.WsFrameServer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.tomcat.websocket.WsFrameBase
WsFrameBase.ReadState
-
Field Summary
Fields inherited from class org.apache.tomcat.websocket.WsFrameBase
inputBuffer, wsSession
-
Constructor Summary
ConstructorDescriptionWsFrameServer
(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsSession wsSession, Transformation transformation, ClassLoader applicationClassLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected Log
getLog()
protected Transformation
protected boolean
isMasked()
protected boolean
isOpen()
protected void
This method will be invoked when the read operation is resumed.protected void
sendMessageBinary
(ByteBuffer msg, boolean last) protected void
sendMessageText
(boolean last) protected void
updateStats
(long payloadLength) Hook for updating server side statistics.Methods inherited from class org.apache.tomcat.websocket.WsFrameBase
byteArrayToLong, changeReadState, changeReadState, getReadState, isSuspended, processInputBuffer, resume, suspend
-
Constructor Details
-
WsFrameServer
public WsFrameServer(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsSession wsSession, Transformation transformation, ClassLoader applicationClassLoader)
-
-
Method Details
-
updateStats
protected void updateStats(long payloadLength) Description copied from class:WsFrameBase
Hook for updating server side statistics. Called on every frame received.- Overrides:
updateStats
in classWsFrameBase
- Parameters:
payloadLength
- Size of message payload
-
isMasked
protected boolean isMasked()- Specified by:
isMasked
in classWsFrameBase
-
getTransformation
- Overrides:
getTransformation
in classWsFrameBase
-
isOpen
protected boolean isOpen()- Overrides:
isOpen
in classWsFrameBase
-
getLog
- Specified by:
getLog
in classWsFrameBase
-
sendMessageText
- Overrides:
sendMessageText
in classWsFrameBase
- Throws:
WsIOException
-
sendMessageBinary
- Overrides:
sendMessageBinary
in classWsFrameBase
- Throws:
WsIOException
-
resumeProcessing
protected void resumeProcessing()Description copied from class:WsFrameBase
This method will be invoked when the read operation is resumed. As the suspend of the read operation can be invoked at any time, when implementing this method one should consider that there might still be data remaining into the internal buffers that needs to be processed before reading again from the socket.- Specified by:
resumeProcessing
in classWsFrameBase
-