jdk/src/solaris/classes/sun/nio/ch/sctp/AssociationChange.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
    24  */
    24  */
    25 package sun.nio.ch.sctp;
    25 package sun.nio.ch.sctp;
    26 
    26 
    27 import com.sun.nio.sctp.Association;
    27 import com.sun.nio.sctp.Association;
    28 import com.sun.nio.sctp.AssociationChangeNotification;
    28 import com.sun.nio.sctp.AssociationChangeNotification;
    29 import javax.tools.annotation.GenerateNativeHeader;
    29 import java.lang.annotation.Native;
    30 
    30 
    31 /**
    31 /**
    32  * An implementation of AssociationChangeNotification
    32  * An implementation of AssociationChangeNotification
    33  */
    33  */
    34 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    35 @GenerateNativeHeader
       
    36 public class AssociationChange extends AssociationChangeNotification
    34 public class AssociationChange extends AssociationChangeNotification
    37     implements SctpNotification
    35     implements SctpNotification
    38 {
    36 {
    39     /* static final ints so that they can be referenced from native */
    37     /* static final ints so that they can be referenced from native */
    40     private final static int SCTP_COMM_UP = 1;
    38     @Native private final static int SCTP_COMM_UP = 1;
    41     private final static int SCTP_COMM_LOST = 2;
    39     @Native private final static int SCTP_COMM_LOST = 2;
    42     private final static int SCTP_RESTART = 3;
    40     @Native private final static int SCTP_RESTART = 3;
    43     private final static int SCTP_SHUTDOWN = 4;
    41     @Native private final static int SCTP_SHUTDOWN = 4;
    44     private final static int SCTP_CANT_START = 5;
    42     @Native private final static int SCTP_CANT_START = 5;
    45 
    43 
    46     private Association association;
    44     private Association association;
    47 
    45 
    48     /* assocId is used to lookup the association before the notification is
    46     /* assocId is used to lookup the association before the notification is
    49      * returned to user code */
    47      * returned to user code */