Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/nio/sctp/SendFailedNotification.java
38924 views
1
/*
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.
4
*
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
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
package com.sun.nio.sctp;
26
27
import java.nio.ByteBuffer;
28
import java.net.SocketAddress;
29
30
/**
31
* Notification emitted when a send failed notification has been received.
32
*
33
* <P> A send failed notification indicates that a message cannot be delivered.
34
* Typically this is because the association has been shutdown with unsent data
35
* in the socket output buffer, or in the case of a {@link SctpMultiChannel}
36
* the association failed to setup.
37
*
38
* @since 1.7
39
*/
40
@jdk.Exported
41
public abstract class SendFailedNotification implements Notification {
42
/**
43
* Initializes a new instance of this class.
44
*/
45
protected SendFailedNotification() {}
46
47
/**
48
* Returns the association that this notification is applicable to.
49
*
50
* @return The association that failed to send, or {@code null} if
51
* there is no association, that is, the notification follows a
52
* {@linkplain
53
* com.sun.nio.sctp.AssociationChangeNotification.AssocChangeEvent#CANT_START}
54
*/
55
@Override
56
public abstract Association association();
57
58
/**
59
* Returns the address.
60
*
61
* @return The peer primary address of the association or the address that
62
* the message was sent to
63
*/
64
public abstract SocketAddress address();
65
66
/**
67
* Returns the data that was to be sent.
68
*
69
* @return The user data. The buffers position will be {@code 0} and its
70
* limit will be set to the end of the data.
71
*/
72
public abstract ByteBuffer buffer();
73
74
/**
75
* Returns the error code.
76
*
77
* <P> The errorCode gives the reason why the send failed, and if set, will
78
* be a SCTP protocol error code as defined in RFC2960 section 3.3.10
79
*
80
* @return The error code
81
*/
82
public abstract int errorCode();
83
84
/**
85
* Returns the stream number that the messge was to be sent on.
86
*
87
* @return The stream number
88
*/
89
public abstract int streamNumber();
90
}
91
92