Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/net/ssl/SSLSessionBindingEvent.java
38918 views
/*1* Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/242526package javax.net.ssl;2728import java.util.EventObject;293031/**32* This event is propagated to a SSLSessionBindingListener.33* When a listener object is bound or unbound to an SSLSession by34* {@link SSLSession#putValue(String, Object)}35* or {@link SSLSession#removeValue(String)}, objects which36* implement the SSLSessionBindingListener will be receive an37* event of this type. The event's <code>name</code> field is the38* key in which the listener is being bound or unbound.39*40* @see SSLSession41* @see SSLSessionBindingListener42*43* @since 1.444* @author Nathan Abramson45* @author David Brownell46*/47public48class SSLSessionBindingEvent49extends EventObject50{51private static final long serialVersionUID = 3989172637106345L;5253/**54* @serial The name to which the object is being bound or unbound55*/56private String name;5758/**59* Constructs a new SSLSessionBindingEvent.60*61* @param session the SSLSession acting as the source of the event62* @param name the name to which the object is being bound or unbound63* @exception IllegalArgumentException if <code>session</code> is null.64*/65public SSLSessionBindingEvent(SSLSession session, String name)66{67super(session);68this.name = name;69}7071/**72* Returns the name to which the object is being bound, or the name73* from which the object is being unbound.74*75* @return the name to which the object is being bound or unbound76*/77public String getName()78{79return name;80}8182/**83* Returns the SSLSession into which the listener is being bound or84* from which the listener is being unbound.85*86* @return the <code>SSLSession</code>87*/88public SSLSession getSession()89{90return (SSLSession) getSource();91}92}939495