Package org.apache.tomcat.websocket
Class WsRemoteEndpointImplClient
- java.lang.Object
-
- org.apache.tomcat.websocket.WsRemoteEndpointImplBase
-
- org.apache.tomcat.websocket.WsRemoteEndpointImplClient
-
- All Implemented Interfaces:
RemoteEndpoint
public class WsRemoteEndpointImplClient extends WsRemoteEndpointImplBase
Client-side implementation of a WebSocket remote endpoint.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.websocket.RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic
-
-
Field Summary
-
Fields inherited from class org.apache.tomcat.websocket.WsRemoteEndpointImplBase
messagePartInProgress, SENDRESULT_OK, sm
-
-
Constructor Summary
Constructors Constructor Description WsRemoteEndpointImplClient(AsyncChannelWrapper channel)Constructs a client-side remote endpoint for the given channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoClose()Performs the actual close operation on the underlying connection.protected voiddoWrite(SendHandler handler, long blockingWriteTimeoutExpiry, java.nio.ByteBuffer... data)Writes data to the underlying connection.protected java.util.concurrent.locks.ReentrantLockgetLock()Returns the lock used for thread-safe operations.protected booleanisMasked()Checks if frames should be masked.-
Methods inherited from class org.apache.tomcat.websocket.WsRemoteEndpointImplBase
acquireMessagePartInProgressSemaphore, close, flushBatch, getBatchingAllowed, getSendStream, getSendTimeout, getSendWriter, sendBytes, sendBytesByCompletion, sendBytesByFuture, sendObject, sendObjectByCompletion, sendObjectByFuture, sendPartialBytes, sendPartialString, sendPing, sendPong, sendString, sendStringByCompletion, sendStringByFuture, setBatchingAllowed, setEncoders, setSendTimeout, setSession, setTransformation, updateStats
-
-
-
-
Constructor Detail
-
WsRemoteEndpointImplClient
public WsRemoteEndpointImplClient(AsyncChannelWrapper channel)
Constructs a client-side remote endpoint for the given channel.- Parameters:
channel- the async channel wrapper
-
-
Method Detail
-
isMasked
protected boolean isMasked()
Description copied from class:WsRemoteEndpointImplBaseChecks if frames should be masked.- Specified by:
isMaskedin classWsRemoteEndpointImplBase- Returns:
- true if masking is required
-
doWrite
protected void doWrite(SendHandler handler, long blockingWriteTimeoutExpiry, java.nio.ByteBuffer... data)
Description copied from class:WsRemoteEndpointImplBaseWrites data to the underlying connection.- Specified by:
doWritein classWsRemoteEndpointImplBase- Parameters:
handler- the send handlerblockingWriteTimeoutExpiry- the timeout expiry timedata- the data buffers to write
-
doClose
protected void doClose()
Description copied from class:WsRemoteEndpointImplBasePerforms the actual close operation on the underlying connection.- Specified by:
doClosein classWsRemoteEndpointImplBase
-
getLock
protected java.util.concurrent.locks.ReentrantLock getLock()
Description copied from class:WsRemoteEndpointImplBaseReturns the lock used for thread-safe operations.- Specified by:
getLockin classWsRemoteEndpointImplBase- Returns:
- the reentrant lock
-
-