Skip to content

Package: SessionException

SessionException

nameinstructionbranchcomplexitylinemethod
SessionException(String, Throwable, Session)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getSession()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 2018, 2019 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: /**
21: * A SessionException represents a general exception type reporting problems occurring on a websocket session.
22: *
23: * @author dannycoward
24: */
25: public class SessionException extends Exception {
26: private final Session session;
27: private static final long serialVersionUID = 014;
28:
29: /**
30: * Creates a new instance of this exception with the given message, the wrapped cause of the exception and the
31: * session with which the problem is associated.
32: *
33: * @param message a description of the problem
34: * @param cause the error that caused the problem
35: * @param session the session on which the problem occurred.
36: */
37: public SessionException(String message, Throwable cause, Session session) {
38: super(message, cause);
39: this.session = session;
40: }
41:
42: /**
43: * Return the Session on which the problem occurred.
44: *
45: * @return the session
46: */
47: public Session getSession() {
48: return this.session;
49: }
50: }