001/*
002 * Copyright 2002-2014 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.web.socket.server;
018
019import org.springframework.core.NestedRuntimeException;
020
021/**
022 * Thrown when handshake processing failed to complete due to an internal, unrecoverable
023 * error. This implies a server error (HTTP status code 500) as opposed to a failure in
024 * the handshake negotiation.
025 *
026 * <p>By contrast, when handshake negotiation fails, the response status code will be 200
027 * and the response headers and body will have been updated to reflect the cause for the
028 * failure. A {@link HandshakeHandler} implementation will have protected methods to
029 * customize updates to the response in those cases.
030 *
031 * @author Rossen Stoyanchev
032 * @since 4.0
033 */
034@SuppressWarnings("serial")
035public class HandshakeFailureException extends NestedRuntimeException {
036
037        public HandshakeFailureException(String message) {
038                super(message);
039        }
040
041        public HandshakeFailureException(String message, Throwable cause) {
042                super(message, cause);
043        }
044
045}