src/java.net.http/share/classes/java/net/http/WebSocketHandshakeException.java
branchhttp-client-branch
changeset 56680 84fc885b019d
parent 56451 9585061fdb04
child 56795 03ece2518428
equal deleted inserted replaced
56679:cf6abca7ae7a 56680:84fc885b019d
    26 package java.net.http;
    26 package java.net.http;
    27 
    27 
    28 import java.io.IOException;
    28 import java.io.IOException;
    29 
    29 
    30 /**
    30 /**
    31  * An exception used to signal the opening handshake failed.
    31  * Thrown when the opening handshake has failed.
    32  *
    32  *
    33  * @since 11
    33  * @since 11
    34  */
    34  */
    35 public final class WebSocketHandshakeException extends IOException {
    35 public final class WebSocketHandshakeException extends IOException {
    36 
    36 
    53      * Returns the server's counterpart of the opening handshake.
    53      * Returns the server's counterpart of the opening handshake.
    54      *
    54      *
    55      * <p> The value may be unavailable ({@code null}) if this exception has
    55      * <p> The value may be unavailable ({@code null}) if this exception has
    56      * been serialized and then deserialized.
    56      * been serialized and then deserialized.
    57      *
    57      *
       
    58      * @apiNote The primary purpose of this method is to allow programmatic
       
    59      * examination of the reasons behind the failure of the opening handshake.
       
    60      * Some of these reasons might allow recovery.
       
    61      *
    58      * @return server response
    62      * @return server response
    59      */
    63      */
    60     public HttpResponse<?> getResponse() {
    64     public HttpResponse<?> getResponse() {
    61         return response;
    65         return response;
    62     }
    66     }