0N/A/*
2362N/A * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A
0N/Apackage javax.net.ssl;
0N/A
0N/Aimport java.util.EventObject;
0N/A
0N/A
0N/A/**
0N/A * This event is propagated to a SSLSessionBindingListener.
0N/A * When a listener object is bound or unbound to an SSLSession by
0N/A * {@link SSLSession#putValue(String, Object)}
0N/A * or {@link SSLSession#removeValue(String)}, objects which
0N/A * implement the SSLSessionBindingListener will be receive an
0N/A * event of this type. The event's <code>name</code> field is the
0N/A * key in which the listener is being bound or unbound.
0N/A *
0N/A * @see SSLSession
0N/A * @see SSLSessionBindingListener
0N/A *
0N/A * @since 1.4
0N/A * @author Nathan Abramson
0N/A * @author David Brownell
0N/A */
0N/Apublic
0N/Aclass SSLSessionBindingEvent
0N/Aextends EventObject
0N/A{
0N/A private static final long serialVersionUID = 3989172637106345L;
0N/A
0N/A /**
0N/A * @serial The name to which the object is being bound or unbound
0N/A */
0N/A private String name;
0N/A
0N/A /**
0N/A * Constructs a new SSLSessionBindingEvent.
0N/A *
0N/A * @param session the SSLSession acting as the source of the event
0N/A * @param name the name to which the object is being bound or unbound
0N/A * @exception IllegalArgumentException if <code>session</code> is null.
0N/A */
0N/A public SSLSessionBindingEvent(SSLSession session, String name)
0N/A {
0N/A super(session);
0N/A this.name = name;
0N/A }
0N/A
0N/A /**
0N/A * Returns the name to which the object is being bound, or the name
0N/A * from which the object is being unbound.
0N/A *
0N/A * @return the name to which the object is being bound or unbound
0N/A */
0N/A public String getName()
0N/A {
0N/A return name;
0N/A }
0N/A
0N/A /**
0N/A * Returns the SSLSession into which the listener is being bound or
0N/A * from which the listener is being unbound.
0N/A *
0N/A * @return the <code>SSLSession</code>
0N/A */
0N/A public SSLSession getSession()
0N/A {
0N/A return (SSLSession) getSource();
0N/A }
0N/A}