View Javadoc
1   /*
2    * Copyright 2002-2014 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.springframework.web.socket.server;
18  
19  import org.springframework.core.NestedRuntimeException;
20  
21  /**
22   * Thrown when handshake processing failed to complete due to an internal, unrecoverable
23   * error. This implies a server error (HTTP status code 500) as opposed to a failure in
24   * the handshake negotiation.
25   *
26   * <p>By contrast, when handshake negotiation fails, the response status code will be 200
27   * and the response headers and body will have been updated to reflect the cause for the
28   * failure. A {@link HandshakeHandler} implementation will have protected methods to
29   * customize updates to the response in those cases.
30   *
31   * @author Rossen Stoyanchev
32   * @since 4.0
33   */
34  @SuppressWarnings("serial")
35  public class HandshakeFailureException extends NestedRuntimeException {
36  
37  	public HandshakeFailureException(String message) {
38  		super(message);
39  	}
40  
41  	public HandshakeFailureException(String message, Throwable cause) {
42  		super(message, cause);
43  	}
44  
45  }