Package org.apache.tomcat.websocket.server

## Class WsRemoteEndpointImplServer

- java.lang.Object
- - org.apache.tomcat.websocket.WsRemoteEndpointImplBase
  - - org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer

- All Implemented Interfaces:
    `RemoteEndpoint`

      public class WsRemoteEndpointImplServer
      extends WsRemoteEndpointImplBase

  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

    Constructors
    Constructor | Description
    --- | ---
    `WsRemoteEndpointImplServer​(SocketWrapperBase<?> socketWrapper, UpgradeInfo upgradeInfo, WsServerContainer serverContainer)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `doClose()` |
    `protected void` | `doWrite​(SendHandler handler, long blockingWriteTimeoutExpiry, java.nio.ByteBuffer... buffers)` |
    `protected long` | `getTimeoutExpiry()` |
    `protected boolean` | `isMasked()` |
    `protected void` | `onTimeout​(boolean useDispatch)` |
    `void` | `onWritePossible​(boolean useDispatch)` |
    `protected void` | `setTransformation​(Transformation transformation)` |
    `protected void` | `updateStats​(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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WsRemoteEndpointImplServer

          public WsRemoteEndpointImplServer​(SocketWrapperBase<?> socketWrapper,
                                            UpgradeInfo upgradeInfo,
                                            WsServerContainer serverContainer)

  - ### Method Detail

    - #### isMasked

          protected final boolean isMasked()

      Specified by:
        `isMasked` in class `WsRemoteEndpointImplBase`

    - #### doWrite

          protected void doWrite​(SendHandler handler,
                                 long blockingWriteTimeoutExpiry,
                                 java.nio.ByteBuffer... buffers)

      Specified by:
        `doWrite` in class `WsRemoteEndpointImplBase`

    - #### updateStats

          protected void updateStats​(long payloadLength)

      Description copied from class: `WsRemoteEndpointImplBase`
      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).
      Overrides:
        `updateStats` in class `WsRemoteEndpointImplBase`
      Parameters:
        `payloadLength` - Size of message payload

    - #### onWritePossible

          public void onWritePossible​(boolean useDispatch)

    - #### doClose

          protected void doClose()

      Specified by:
        `doClose` in class `WsRemoteEndpointImplBase`

    - #### getTimeoutExpiry

          protected long getTimeoutExpiry()

    - #### onTimeout

          protected void onTimeout​(boolean useDispatch)

    - #### setTransformation

          protected void setTransformation​(Transformation transformation)

      Overrides:
        `setTransformation` in class `WsRemoteEndpointImplBase`