Class CloseStatus


  • @Deprecated(since="2021-05-27")
    public class CloseStatus
    extends java.lang.Object
    Deprecated.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_REASON_PHRASE
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      CloseStatus​(int closeCode, java.lang.String reasonPhrase)
      Deprecated.
      Creates a reason for closing a web socket connection with the given code and reason phrase.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int getCode()
      Deprecated.
       
      java.lang.String getPhrase()
      Deprecated.
       
      static java.lang.String trimMaxReasonLength​(java.lang.String reason)
      Deprecated.
      use of this method is strongly discouraged, as it creates too many new objects that are just thrown away to accomplish its goals.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_REASON_PHRASE

        public static final int MAX_REASON_PHRASE
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CloseStatus

        public CloseStatus​(int closeCode,
                           java.lang.String reasonPhrase)
        Deprecated.
        Creates a reason for closing a web socket connection with the given code and reason phrase.
        Parameters:
        closeCode - the close code
        reasonPhrase - the reason phrase
        See Also:
        StatusCode
    • Method Detail

      • trimMaxReasonLength

        @Deprecated
        public static java.lang.String trimMaxReasonLength​(java.lang.String reason)
        Deprecated.
        use of this method is strongly discouraged, as it creates too many new objects that are just thrown away to accomplish its goals.
        Convenience method for trimming a long reason phrase at the maximum reason phrase length of 123 UTF-8 bytes (per WebSocket spec).
        Parameters:
        reason - the proposed reason phrase
        Returns:
        the reason phrase (trimmed if needed)
      • getCode

        public int getCode()
        Deprecated.
      • getPhrase

        public java.lang.String getPhrase()
        Deprecated.