Class WebSocketPolicy.Delegated

  • Enclosing class:
    WebSocketPolicy

    private class WebSocketPolicy.Delegated
    extends WebSocketPolicy
    Allows Behavior to be changed, but the settings to delegated.

    This rears its ugly head when a JSR356 Server Container is used as a JSR356 Client Container. The JSR356 Server Container is Behavior SERVER, but its container level Policy is shared with the JSR356 Client Container as well. This allows a delegate to the policy with a different behavior.

    • Method Detail

      • getAsyncWriteTimeout

        public long getAsyncWriteTimeout()
        Description copied from class: WebSocketPolicy
        The timeout in ms (milliseconds) for async write operations.

        Negative values indicate a disabled timeout.

        Overrides:
        getAsyncWriteTimeout in class WebSocketPolicy
        Returns:
        the timeout for async write operations. negative values indicate disabled timeout.
      • getIdleTimeout

        public long getIdleTimeout()
        Description copied from class: WebSocketPolicy
        The time in ms (milliseconds) that a websocket connection may be idle before being closed automatically.
        Overrides:
        getIdleTimeout in class WebSocketPolicy
        Returns:
        the timeout in milliseconds for idle timeout.
      • getInputBufferSize

        public int getInputBufferSize()
        Description copied from class: WebSocketPolicy
        The size of the input (read from network layer) buffer size.

        This is the raw read operation buffer size, before the parsing of the websocket frames.

        Overrides:
        getInputBufferSize in class WebSocketPolicy
        Returns:
        the raw network bytes read operation buffer size.
      • getMaxBinaryMessageBufferSize

        public int getMaxBinaryMessageBufferSize()
        Description copied from class: WebSocketPolicy
        Get the maximum size of a binary message buffer (for streaming writing)
        Overrides:
        getMaxBinaryMessageBufferSize in class WebSocketPolicy
        Returns:
        the maximum size of a binary message buffer
      • getMaxBinaryMessageSize

        public int getMaxBinaryMessageSize()
        Description copied from class: WebSocketPolicy
        Get the maximum size of a binary message during parsing.

        This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling binary messages. This applies to individual frames, whole message handling, and partial message handling.

        Binary messages over this maximum will result in a close code 1009 StatusCode.MESSAGE_TOO_LARGE

        Overrides:
        getMaxBinaryMessageSize in class WebSocketPolicy
        Returns:
        the maximum size of a binary message
      • getMaxTextMessageBufferSize

        public int getMaxTextMessageBufferSize()
        Description copied from class: WebSocketPolicy
        Get the maximum size of a text message buffer (for streaming writing)
        Overrides:
        getMaxTextMessageBufferSize in class WebSocketPolicy
        Returns:
        the maximum size of a text message buffer
      • getMaxTextMessageSize

        public int getMaxTextMessageSize()
        Description copied from class: WebSocketPolicy
        Get the maximum size of a text message during parsing.

        This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling text messages. This applies to individual frames, whole message handling, and partial message handling.

        Text messages over this maximum will result in a close code 1009 StatusCode.MESSAGE_TOO_LARGE

        Overrides:
        getMaxTextMessageSize in class WebSocketPolicy
        Returns:
        the maximum size of a text message.
      • setAsyncWriteTimeout

        public void setAsyncWriteTimeout​(long ms)
        Description copied from class: WebSocketPolicy
        The timeout in ms (milliseconds) for async write operations.

        Negative values indicate a disabled timeout.

        Overrides:
        setAsyncWriteTimeout in class WebSocketPolicy
        Parameters:
        ms - the timeout in milliseconds
      • setIdleTimeout

        public void setIdleTimeout​(long ms)
        Description copied from class: WebSocketPolicy
        The time in ms (milliseconds) that a websocket may be idle before closing.
        Overrides:
        setIdleTimeout in class WebSocketPolicy
        Parameters:
        ms - the timeout in milliseconds
      • setInputBufferSize

        public void setInputBufferSize​(int size)
        Description copied from class: WebSocketPolicy
        The size of the input (read from network layer) buffer size.
        Overrides:
        setInputBufferSize in class WebSocketPolicy
        Parameters:
        size - the size in bytes
      • setMaxBinaryMessageBufferSize

        public void setMaxBinaryMessageBufferSize​(int size)
        Description copied from class: WebSocketPolicy
        The maximum size of a binary message buffer.

        Used ONLY for stream based binary message writing.

        Overrides:
        setMaxBinaryMessageBufferSize in class WebSocketPolicy
        Parameters:
        size - the maximum size of the binary message buffer
      • setMaxBinaryMessageSize

        public void setMaxBinaryMessageSize​(int size)
        Description copied from class: WebSocketPolicy
        The maximum size of a binary message during parsing.

        This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling binary messages. This applies to individual frames, whole message handling, and partial message handling.

        Binary messages over this maximum will result in a close code 1009 StatusCode.MESSAGE_TOO_LARGE

        Overrides:
        setMaxBinaryMessageSize in class WebSocketPolicy
        Parameters:
        size - the maximum allowed size of a binary message.
      • setMaxTextMessageBufferSize

        public void setMaxTextMessageBufferSize​(int size)
        Description copied from class: WebSocketPolicy
        The maximum size of a text message buffer.

        Used ONLY for stream based text message writing.

        Overrides:
        setMaxTextMessageBufferSize in class WebSocketPolicy
        Parameters:
        size - the maximum size of the text message buffer
      • setMaxTextMessageSize

        public void setMaxTextMessageSize​(int size)
        Description copied from class: WebSocketPolicy
        The maximum size of a text message during parsing.

        This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling text messages. This applies to individual frames, whole message handling, and partial message handling.

        Text messages over this maximum will result in a close code 1009 StatusCode.MESSAGE_TOO_LARGE

        Overrides:
        setMaxTextMessageSize in class WebSocketPolicy
        Parameters:
        size - the maximum allowed size of a text message.