Class WebSocketContext


  • public class WebSocketContext
    extends Object
    • Field Detail

      • DEFAULT_MAXMESSAGESIZE

        public static final long DEFAULT_MAXMESSAGESIZE
        See Also:
        Constant Field Values
      • DEFAULT_PACKETFRAGMENTATIONSIZE

        public static final long DEFAULT_PACKETFRAGMENTATIONSIZE
        See Also:
        Constant Field Values
      • DEFAULT_VALIDATIONFREQUENCY

        public static final int DEFAULT_VALIDATIONFREQUENCY
        See Also:
        Constant Field Values
      • DEFAULT_MASKOUTGOINGMESSAGES

        public static final boolean DEFAULT_MASKOUTGOINGMESSAGES
        See Also:
        Constant Field Values
      • DEFAULT_MAXIMUMPENDINGWRITEBYTES

        public static final int DEFAULT_MAXIMUMPENDINGWRITEBYTES
        See Also:
        Constant Field Values
    • Constructor Detail

      • WebSocketContext

        public WebSocketContext()
    • Method Detail

      • getMaximumMessageSize

        public long getMaximumMessageSize()
        Get the maximum WebSocket message size for a single message (0 = no limit)
        Returns:
        maximum WebSocket message size
      • setMaximumMessageSize

        public void setMaximumMessageSize​(long maxMessageSize)
        Set the maximum WebSocket message size for a single message (0 = no limit)
        Parameters:
        maxMessageSize - maximum WebSocket message size
      • isMaskOutgoingMessages

        public boolean isMaskOutgoingMessages()
        Should outgoing messages be masked (many browsers do not support masked outgoing messages)
        Returns:
        true, if messages are masked
      • setMaskOutgoingMessages

        public void setMaskOutgoingMessages​(boolean maskOutgoingMessages)
        Should outgoing messages be masked (many browsers do not support masked outgoing messages)
        Parameters:
        maskOutgoingMessages - true, if messages are masked
      • getIdleFrequency

        public int getIdleFrequency()
        Get time in milliseconds between idle events
        Returns:
        idle time (milliseconds)
      • setIdleFrequency

        public void setIdleFrequency​(int idleFrequency)
        Set time in milliseconds between idle events
        Parameters:
        idleFrequency - idle time (milliseconds)
      • getPacketFragmentationSize

        public long getPacketFragmentationSize()
        Not being used currently
        Returns:
        not being used
      • setPacketFragmentationSize

        public void setPacketFragmentationSize​(long packetFragmentationSize)
        Not being used currently
        Parameters:
        packetFragmentationSize - not being used
      • getValidationFrequency

        public int getValidationFrequency()
        Get time in milliseconds between validation messages (ping from server to client). Value of zero turns off validation.
        Returns:
        validation time (milliseconds)
      • setValidationFrequency

        public void setValidationFrequency​(int validationFrequency)
        Set time in milliseconds between validation messages (ping from server to client). Value of zero turns off validation.
        Parameters:
        validationFrequency - validation time (milliseconds)
      • getMaximumPendingWriteBytes

        public int getMaximumPendingWriteBytes()
        Get the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)
        Returns:
        number of bytes that can be pending waiting
      • setMaximumPendingWriteBytes

        public void setMaximumPendingWriteBytes​(int maximumPendingWriteBytes)
        Set the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)
        Parameters:
        maximumPendingWriteBytes - number of bytes that can be pending waiting
      • getPingTimeout

        public int getPingTimeout()
        Get the timeout (milliseconds) that we wait for a response (pong) to a ping message
        Returns:
        timeout (milliseconds)
      • setPingTimeout

        public void setPingTimeout​(int pingTimeout)
        Set the timeout (milliseconds) that we wait for a response (pong) to a ping message
        Parameters:
        pingTimeout - timeout (milliseconds)