Class CloseInfo


  • public class CloseInfo
    extends java.lang.Object
    • Constructor Detail

      • CloseInfo

        public CloseInfo()
      • CloseInfo

        public CloseInfo​(java.nio.ByteBuffer payload,
                         boolean validate)
        Parse the Close Frame payload.
        Parameters:
        payload - the raw close frame payload.
        validate - true if payload should be validated per WebSocket spec.
      • CloseInfo

        public CloseInfo​(Frame frame)
      • CloseInfo

        public CloseInfo​(Frame frame,
                         boolean validate)
      • CloseInfo

        public CloseInfo​(int statusCode)
      • CloseInfo

        public CloseInfo​(int statusCode,
                         java.lang.String reason)
        Create a CloseInfo, trimming the reason to CloseStatus.MAX_REASON_PHRASE UTF-8 bytes if needed.
        Parameters:
        statusCode - the status code
        reason - the raw reason code
    • Method Detail

      • getReason

        public java.lang.String getReason()
      • getStatusCode

        public int getStatusCode()
      • isHarsh

        public boolean isHarsh()
      • isAbnormal

        public boolean isAbnormal()
      • toString

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