Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.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;2526import java.net.SocketAddress;2728/**29* Notification emitted when a destination address on a multi-homed peer30* encounters a change.31*32* @since 1.733*/34@jdk.Exported35public abstract class PeerAddressChangeNotification36implements Notification37{38/**39* Defines the type of address change event that occurred to the destination40* address on a multi-homed peer when it encounters a change of interface41* details.42*43* <P> Some of these events types are only generated when the association44* supports dynamic address reconfiguration, e.g. {@code SCTP_ADDR_ADDED},45* {@code SCTP_ADDR_REMOVED}, etc.46*47* @since 1.748*/49@jdk.Exported50public enum AddressChangeEvent {51/**52* This address is now reachable.53*/54ADDR_AVAILABLE,5556/**57* The address specified can no longer be reached. Any data sent to this58* address is rerouted to an alternate until this address becomes reachable.59*/60ADDR_UNREACHABLE,6162/**63* The address is no longer part of the association.64*/65ADDR_REMOVED,6667/**68* The address is now part of the association.69*/70ADDR_ADDED,7172/**73* This address has now been made to be the primary destination address.74*/75ADDR_MADE_PRIMARY,7677/**78* This address has now been confirmed as a valid address.79*/80ADDR_CONFIRMED;81}8283/**84* Initializes a new instance of this class.85*/86protected PeerAddressChangeNotification() {}8788/**89* Returns the peer address.90*91* @return The peer address92*/93public abstract SocketAddress address();9495/**96* Returns the association that this notification is applicable to.97*98* @return The association whose peer address changed99*/100public abstract Association association();101102/**103* Returns the type of change event.104*105* @return The event106*/107public abstract AddressChangeEvent event();108}109110111