jakarta.websocket.RemoteEndpoint implementation - i.e. what the server uses to send
data to the client.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private volatile ByteBuffer[] | |
| private final WebConnection | |
| private volatile SendHandler | |
| private final Log | |
| private static final StringManager | |
| private final SocketWrapperBase | |
| private volatile long | |
| private final UpgradeInfo | |
| private final WsWriteTimeout |
| Access | Constructor and Description |
|---|---|
| public | WsRemoteEndpointImplServer(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsServerContainer serverContainer, WebConnection connection)
|
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | acquireMessagePartInProgressSemaphore(byte
The OPCODE for the message to be written opCode, long The time when the attempt to acquire the semaphore should expire timeoutExpiry)Overrides org. Acquire the semaphore that allows a message part to be written. |
| pack-priv void | clearHandler(Throwable
The throwable associated with any error that occurred t, boolean Should useDispatch)SendHandler#onResult(SendResult) be called from a new thread, keeping in mind
the requirements of jakarta.
|
| protected void | |
| protected void | doWrite(SendHandler handler, long blockingWriteTimeoutExpiry, ByteBuffer... buffers)
Implements abstract org.
|
| protected Lock | |
| protected long | |
| protected final boolean | |
| protected void | |
| public void | |
| protected void | setTransformation(Transformation transformation)
Overrides org.
|
| protected void | updateStats(long
Size of message payload payloadLength)Overrides org. Hook for updating server side statistics. |
| buffers | back to summary |
|---|---|
| private volatile ByteBuffer[] buffers | |
| connection | back to summary |
|---|---|
| private final WebConnection connection | |
| handler | back to summary |
|---|---|
| private volatile SendHandler handler | |
| log | back to summary |
|---|---|
| private final Log log Hides org. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm Hides org. | |
| socketWrapper | back to summary |
|---|---|
| private final SocketWrapperBase<?> socketWrapper | |
| timeoutExpiry | back to summary |
|---|---|
| private volatile long timeoutExpiry | |
| upgradeInfo | back to summary |
|---|---|
| private final UpgradeInfo upgradeInfo | |
| wsWriteTimeout | back to summary |
|---|---|
| private final WsWriteTimeout wsWriteTimeout | |
| WsRemoteEndpointImplServer | back to summary |
|---|---|
| public WsRemoteEndpointImplServer(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsServerContainer serverContainer, WebConnection connection) | |
| acquireMessagePartInProgressSemaphore | back to summary |
|---|---|
| protected boolean acquireMessagePartInProgressSemaphore(byte opCode, long timeoutExpiry) throws InterruptedException Overrides org. Doc from org. Acquire the semaphore that allows a message part to be written. The close message is a special case. It needs to be blocking else implementing the clean-up that follows the sending of the close message gets a lot more complicated. On the server, this creates additional complications as a dead-lock may occur in the following scenario:
true) and upgrade processors are never pooled.Todo Despite the complications it creates, it would be worth exploring the possibility of processing a received close frame in a non-blocking manner.
| |
| clearHandler | back to summary |
|---|---|
pack-priv void clearHandler(Throwable t, boolean useDispatch)
| |
| doClose | back to summary |
|---|---|
| protected void doClose() Implements abstract org.
| |
| doWrite | back to summary |
|---|---|
| protected void doWrite(SendHandler handler, long blockingWriteTimeoutExpiry, ByteBuffer... buffers) Implements abstract org.
| |
| getLock | back to summary |
|---|---|
| protected Lock getLock() Implements abstract org.
| |
| getTimeoutExpiry | back to summary |
|---|---|
| protected long getTimeoutExpiry() Hides org. | |
| isMasked | back to summary |
|---|---|
| protected final boolean isMasked() Implements abstract org.
| |
| onTimeout | back to summary |
|---|---|
| protected void onTimeout(boolean useDispatch) | |
| onWritePossible | back to summary |
|---|---|
| public void onWritePossible(boolean useDispatch) | |
| setTransformation | back to summary |
|---|---|
| protected void setTransformation(Transformation transformation) Overrides org.
| |
| updateStats | back to summary |
|---|---|
| protected void updateStats(long payloadLength) Overrides org. Doc from org. Hook 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).
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SendHandler | |
| private final Throwable |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| sh | back to summary |
|---|---|
| private final SendHandler sh | |
| t | back to summary |
|---|---|
| private final Throwable t | |
| OnResultRunnable | back to summary |
|---|---|
| private OnResultRunnable(SendHandler sh, Throwable t) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |