Class WsRemoteEndpointImplClient
java.lang.Object
org.apache.tomcat.websocket.WsRemoteEndpointImplBase
org.apache.tomcat.websocket.WsRemoteEndpointImplClient
- All Implemented Interfaces:
RemoteEndpoint
Client-side implementation of a WebSocket remote endpoint.
-
Nested Class Summary
Nested classes/interfaces inherited from interface RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic -
Field Summary
Fields inherited from class WsRemoteEndpointImplBase
messagePartInProgress, SENDRESULT_OK, sm -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a client-side remote endpoint for the given channel. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoClose()Performs the actual close operation on the underlying connection.protected voiddoWrite(SendHandler handler, long blockingWriteTimeoutExpiry, ByteBuffer... data) Writes data to the underlying connection.protected ReentrantLockgetLock()Returns the lock used for thread-safe operations.protected booleanisMasked()Checks if frames should be masked.Methods inherited from class 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 Details
-
WsRemoteEndpointImplClient
Constructs a client-side remote endpoint for the given channel.- Parameters:
channel- the async channel wrapper
-
-
Method Details
-
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
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
Description copied from class:WsRemoteEndpointImplBaseReturns the lock used for thread-safe operations.- Specified by:
getLockin classWsRemoteEndpointImplBase- Returns:
- the reentrant lock
-