jdk/src/solaris/classes/sun/nio/ch/sctp/PeerAddrChange.java
changeset 16734 da1901d79073
parent 14342 8435a30053c1
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    25 package sun.nio.ch.sctp;
    25 package sun.nio.ch.sctp;
    26 
    26 
    27 import java.net.SocketAddress;
    27 import java.net.SocketAddress;
    28 import com.sun.nio.sctp.Association;
    28 import com.sun.nio.sctp.Association;
    29 import com.sun.nio.sctp.PeerAddressChangeNotification;
    29 import com.sun.nio.sctp.PeerAddressChangeNotification;
    30 import javax.tools.annotation.GenerateNativeHeader;
    30 import java.lang.annotation.Native;
    31 
    31 
    32 /**
    32 /**
    33  * An implementation of PeerAddressChangeNotification
    33  * An implementation of PeerAddressChangeNotification
    34  */
    34  */
    35 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    36 @GenerateNativeHeader
       
    37 public class PeerAddrChange extends PeerAddressChangeNotification
    35 public class PeerAddrChange extends PeerAddressChangeNotification
    38     implements SctpNotification
    36     implements SctpNotification
    39 {
    37 {
    40     /* static final ints so that they can be referenced from native */
    38     /* static final ints so that they can be referenced from native */
    41     private final static int SCTP_ADDR_AVAILABLE = 1;
    39     @Native private final static int SCTP_ADDR_AVAILABLE = 1;
    42     private final static int SCTP_ADDR_UNREACHABLE = 2;
    40     @Native private final static int SCTP_ADDR_UNREACHABLE = 2;
    43     private final static int SCTP_ADDR_REMOVED = 3;
    41     @Native private final static int SCTP_ADDR_REMOVED = 3;
    44     private final static int SCTP_ADDR_ADDED = 4;
    42     @Native private final static int SCTP_ADDR_ADDED = 4;
    45     private final static int SCTP_ADDR_MADE_PRIM = 5;
    43     @Native private final static int SCTP_ADDR_MADE_PRIM = 5;
    46     private final static int SCTP_ADDR_CONFIRMED =6;
    44     @Native private final static int SCTP_ADDR_CONFIRMED =6;
    47 
    45 
    48     private Association association;
    46     private Association association;
    49 
    47 
    50     /* assocId is used to lookup the association before the notification is
    48     /* assocId is used to lookup the association before the notification is
    51      * returned to user code */
    49      * returned to user code */