Skip to content

Package: HandshakeResponse

HandshakeResponse

Coverage

1: /*
2: * Copyright (c) 2018, 2020 Oracle and/or its affiliates and others.
3: * All rights reserved.
4: *
5: * This program and the accompanying materials are made available under the
6: * terms of the Eclipse Public License v. 2.0, which is available at
7: * http://www.eclipse.org/legal/epl-2.0.
8: *
9: * This Source Code may also be made available under the following Secondary
10: * Licenses when the conditions for such availability set forth in the
11: * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
12: * version 2 with the GNU Classpath Exception, which is available at
13: * https://www.gnu.org/software/classpath/license.html.
14: *
15: * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16: */
17:
18: package jakarta.websocket;
19:
20: import java.util.List;
21: import java.util.Map;
22:
23: /**
24: * The handshake response represents the WebSocket-defined HTTP response that is the response to the opening handshake
25: * request.
26: *
27: * @author dannycoward
28: */
29: public interface HandshakeResponse {
30:
31: /**
32: * The Sec-WebSocket-Accept header name.
33: */
34: static final String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept";
35:
36: /**
37: * Return the map of HTTP headers to header values sent by the WebSocket server. Note that the lookup of header
38: * names will be performed in a case insensitive manner.
39: *
40: * @return the HTTP headers.
41: */
42: Map<String, List<String>> getHeaders();
43: }