Class OpeningHandshakeException

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBody()
      Get the response body contained in the WebSocket opening handshake response from the server.
      Map<String,​List<String>> getHeaders()
      Get the HTTP headers contained in the WebSocket opening handshake response from the server.
      StatusLine getStatusLine()
      Get the status line contained in the WebSocket opening handshake response from the server.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getStatusLine

        🡇     🗕  🗗  🗖
        public StatusLine getStatusLine()
        Get the status line contained in the WebSocket opening handshake response from the server.
        Returns:
        The status line.
        Code:
        Exact Method Body:
         return mStatusLine;
        
      • getHeaders

        🡅  🡇     🗕  🗗  🗖
        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders
                    ()
        
        Get the HTTP headers contained in the WebSocket opening handshake response from the server.
        Returns:
        The HTTP headers. The returned map is an instance of TreeMap with String.CASE_INSENSITIVE_ORDER comparator.
        Code:
        Exact Method Body:
         return mHeaders;
        
      • getBody

        🡅     🗕  🗗  🗖
        public byte[] getBody()
        Get the response body contained in the WebSocket opening handshake response from the server.

        This method returns a non-null value only when (1) the status code is not 101 (Switching Protocols), (2) the response from the server has a response body, (3) the response has "Content-Length" header, and (4) no error occurred during reading the response body. In other cases, this method returns null.

        Returns:
        The response body.
        Code:
        Exact Method Body:
         return mBody;