author | darcy |
Thu, 29 Aug 2019 16:31:34 -0700 | |
changeset 57956 | e0b8b019d2f5 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
57956
e0b8b019d2f5
8229997: Apply java.io.Serial annotations in java.base
darcy
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
||
27 |
package javax.net.ssl; |
|
28 |
||
29 |
import java.util.EventObject; |
|
30 |
||
31 |
||
32 |
/** |
|
33 |
* This event is propagated to a SSLSessionBindingListener. |
|
34 |
* When a listener object is bound or unbound to an SSLSession by |
|
35 |
* {@link SSLSession#putValue(String, Object)} |
|
36 |
* or {@link SSLSession#removeValue(String)}, objects which |
|
37 |
* implement the SSLSessionBindingListener will be receive an |
|
38 |
* event of this type. The event's <code>name</code> field is the |
|
39 |
* key in which the listener is being bound or unbound. |
|
40 |
* |
|
41 |
* @see SSLSession |
|
42 |
* @see SSLSessionBindingListener |
|
43 |
* |
|
44 |
* @since 1.4 |
|
45 |
* @author Nathan Abramson |
|
46 |
* @author David Brownell |
|
47 |
*/ |
|
48 |
public |
|
49 |
class SSLSessionBindingEvent |
|
50 |
extends EventObject |
|
51 |
{ |
|
57956
e0b8b019d2f5
8229997: Apply java.io.Serial annotations in java.base
darcy
parents:
47216
diff
changeset
|
52 |
@java.io.Serial |
2 | 53 |
private static final long serialVersionUID = 3989172637106345L; |
54 |
||
55 |
/** |
|
56 |
* @serial The name to which the object is being bound or unbound |
|
57 |
*/ |
|
58 |
private String name; |
|
59 |
||
60 |
/** |
|
61 |
* Constructs a new SSLSessionBindingEvent. |
|
62 |
* |
|
63 |
* @param session the SSLSession acting as the source of the event |
|
64 |
* @param name the name to which the object is being bound or unbound |
|
65 |
* @exception IllegalArgumentException if <code>session</code> is null. |
|
66 |
*/ |
|
67 |
public SSLSessionBindingEvent(SSLSession session, String name) |
|
68 |
{ |
|
69 |
super(session); |
|
70 |
this.name = name; |
|
71 |
} |
|
72 |
||
73 |
/** |
|
74 |
* Returns the name to which the object is being bound, or the name |
|
75 |
* from which the object is being unbound. |
|
76 |
* |
|
77 |
* @return the name to which the object is being bound or unbound |
|
78 |
*/ |
|
79 |
public String getName() |
|
80 |
{ |
|
81 |
return name; |
|
82 |
} |
|
83 |
||
84 |
/** |
|
85 |
* Returns the SSLSession into which the listener is being bound or |
|
86 |
* from which the listener is being unbound. |
|
87 |
* |
|
88 |
* @return the <code>SSLSession</code> |
|
89 |
*/ |
|
90 |
public SSLSession getSession() |
|
91 |
{ |
|
92 |
return (SSLSession) getSource(); |
|
93 |
} |
|
94 |
} |