Class WebSocketPolicy


  • @Deprecated(since="2021-05-27")
    public class WebSocketPolicy
    extends java.lang.Object
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Settings for WebSocket operations.
    • Constructor Detail

      • WebSocketPolicy

        public WebSocketPolicy​(WebSocketBehavior behavior)
        Deprecated.
    • Method Detail

      • newClientPolicy

        public static WebSocketPolicy newClientPolicy()
        Deprecated.
      • newServerPolicy

        public static WebSocketPolicy newServerPolicy()
        Deprecated.
      • assertValidBinaryMessageSize

        public void assertValidBinaryMessageSize​(int requestedSize)
        Deprecated.
      • assertValidTextMessageSize

        public void assertValidTextMessageSize​(int requestedSize)
        Deprecated.
      • clonePolicy

        public WebSocketPolicy clonePolicy()
        Deprecated.
        Make a copy of the policy, with current values.
        Returns:
        the cloned copy of the policy.
      • clonePolicy

        @Deprecated
        public WebSocketPolicy clonePolicy​(WebSocketBehavior behavior)
        Deprecated.
        Make a copy of the policy, with current values, but a different behavior.
        Parameters:
        behavior - the behavior to copy/clone
        Returns:
        the cloned policy with a new behavior.
      • getAsyncWriteTimeout

        @Deprecated
        public long getAsyncWriteTimeout()
        Deprecated.
        The timeout in ms (milliseconds) for async write operations.

        Negative values indicate a disabled timeout.

        Returns:
        the timeout for async write operations. negative values indicate disabled timeout.
      • getIdleTimeout

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

        public int getInputBufferSize()
        Deprecated.
        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.

        Returns:
        the raw network bytes read operation buffer size.
      • getMaxBinaryMessageBufferSize

        public int getMaxBinaryMessageBufferSize()
        Deprecated.
        Get the maximum size of a binary message buffer (for streaming writing)
        Returns:
        the maximum size of a binary message buffer
      • getMaxBinaryMessageSize

        public int getMaxBinaryMessageSize()
        Deprecated.
        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

        Returns:
        the maximum size of a binary message
      • getMaxTextMessageBufferSize

        public int getMaxTextMessageBufferSize()
        Deprecated.
        Get the maximum size of a text message buffer (for streaming writing)
        Returns:
        the maximum size of a text message buffer
      • getMaxTextMessageSize

        public int getMaxTextMessageSize()
        Deprecated.
        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

        Returns:
        the maximum size of a text message.
      • setAsyncWriteTimeout

        public void setAsyncWriteTimeout​(long ms)
        Deprecated.
        The timeout in ms (milliseconds) for async write operations.

        Negative values indicate a disabled timeout.

        Parameters:
        ms - the timeout in milliseconds
      • setIdleTimeout

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

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

        public void setMaxBinaryMessageBufferSize​(int size)
        Deprecated.
        The maximum size of a binary message buffer.

        Used ONLY for stream based binary message writing.

        Parameters:
        size - the maximum size of the binary message buffer
      • setMaxBinaryMessageSize

        public void setMaxBinaryMessageSize​(int size)
        Deprecated.
        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

        Parameters:
        size - the maximum allowed size of a binary message.
      • setMaxTextMessageBufferSize

        public void setMaxTextMessageBufferSize​(int size)
        Deprecated.
        The maximum size of a text message buffer.

        Used ONLY for stream based text message writing.

        Parameters:
        size - the maximum size of the text message buffer
      • setMaxTextMessageSize

        public void setMaxTextMessageSize​(int size)
        Deprecated.
        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

        Parameters:
        size - the maximum allowed size of a text message.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object