Class WsRemoteEndpointImplServer
java.lang.Object
org.apache.tomcat.websocket.WsRemoteEndpointImplBase
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer
- All Implemented Interfaces:
RemoteEndpoint
This is the server side
RemoteEndpoint implementation
- i.e. what the server uses to send data to the client.-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.websocket.RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic -
Field Summary
Fields inherited from class org.apache.tomcat.websocket.WsRemoteEndpointImplBase
SENDRESULT_OK -
Constructor Summary
ConstructorsConstructorDescriptionWsRemoteEndpointImplServer(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsServerContainer serverContainer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoClose()protected voiddoWrite(SendHandler handler, long blockingWriteTimeoutExpiry, ByteBuffer... buffers) protected longprotected final booleanisMasked()protected voidonTimeout(boolean useDispatch) voidonWritePossible(boolean useDispatch) protected voidsetTransformation(Transformation transformation) protected voidupdateStats(long payloadLength) Hook for updating server side statistics.Methods inherited from class org.apache.tomcat.websocket.WsRemoteEndpointImplBase
close, flushBatch, getBatchingAllowed, getSendStream, getSendTimeout, getSendWriter, sendBytes, sendBytesByCompletion, sendBytesByFuture, sendObject, sendObjectByCompletion, sendObjectByFuture, sendPartialBytes, sendPartialString, sendPing, sendPong, sendString, sendStringByCompletion, sendStringByFuture, setBatchingAllowed, setEncoders, setSendTimeout, setSession
-
Constructor Details
-
WsRemoteEndpointImplServer
public WsRemoteEndpointImplServer(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsServerContainer serverContainer)
-
-
Method Details
-
isMasked
protected final boolean isMasked()- Specified by:
isMaskedin classWsRemoteEndpointImplBase
-
doWrite
- Specified by:
doWritein classWsRemoteEndpointImplBase
-
updateStats
protected void updateStats(long payloadLength) Description copied from class:WsRemoteEndpointImplBaseHook for updating server side statistics. Called on every frame written (including when batching is enabled and the frames are buffered locally until the buffer is full or is flushed).- Overrides:
updateStatsin classWsRemoteEndpointImplBase- Parameters:
payloadLength- Size of message payload
-
onWritePossible
public void onWritePossible(boolean useDispatch) -
doClose
protected void doClose()- Specified by:
doClosein classWsRemoteEndpointImplBase
-
getTimeoutExpiry
protected long getTimeoutExpiry() -
onTimeout
protected void onTimeout(boolean useDispatch) -
setTransformation
- Overrides:
setTransformationin classWsRemoteEndpointImplBase
-