Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java
38923 views
/*1* Copyright (c) 2009, 2013, 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*/24package com.sun.nio.sctp;2526/**27* Notification emitted when an association has either opened or closed.28*29* @since 1.730*/31@jdk.Exported32public abstract class AssociationChangeNotification33implements Notification34{35/**36* Defines the type of change event that happened to the association.37*38* @since 1.739*/40@jdk.Exported41public enum AssocChangeEvent42{43/**44* A new association is now ready and data may be exchanged with this peer.45*/46COMM_UP,4748/**49* The association has failed. A series of SCTP send failed notifications50* will follow this notification, one for each outstanding message.51*/52COMM_LOST,5354/**55* SCTP has detected that the peer has restarted.56*/57RESTART,5859/**60* The association has gracefully closed.61*/62SHUTDOWN,6364/**65* The association failed to setup. If a message was sent on a {@link66* SctpMultiChannel} in non-blocking mode, an67* SCTP send failed notification will follow this notification for the68* outstanding message.69*/70CANT_START71}7273/**74* Initializes a new instance of this class.75*/76protected AssociationChangeNotification() {}7778/**79* Returns the association that this notification is applicable to.80*81* @return The association whose state has changed, or {@code null} if82* there is no association, that is {@linkplain83* AssocChangeEvent#CANT_START CANT_START}84*/85public abstract Association association();8687/**88* Returns the type of change event.89*90* @return The event91*/92public abstract AssocChangeEvent event();93}949596