|
1 /* |
|
2 * Copyright (c) 2009, 2012, 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 sun.nio.ch.sctp; |
|
26 |
|
27 import java.net.SocketAddress; |
|
28 import java.net.InetAddress; |
|
29 import java.io.IOException; |
|
30 import java.util.Set; |
|
31 import java.nio.ByteBuffer; |
|
32 import java.nio.channels.spi.SelectorProvider; |
|
33 import com.sun.nio.sctp.Association; |
|
34 import com.sun.nio.sctp.SctpChannel; |
|
35 import com.sun.nio.sctp.MessageInfo; |
|
36 import com.sun.nio.sctp.NotificationHandler; |
|
37 import com.sun.nio.sctp.SctpMultiChannel; |
|
38 import com.sun.nio.sctp.SctpSocketOption; |
|
39 |
|
40 /** |
|
41 * Unimplemented. |
|
42 */ |
|
43 public class SctpMultiChannelImpl extends SctpMultiChannel |
|
44 { |
|
45 private static final String message = "SCTP not supported on this platform"; |
|
46 |
|
47 public SctpMultiChannelImpl(SelectorProvider provider) { |
|
48 super(provider); |
|
49 throw new UnsupportedOperationException(message); |
|
50 } |
|
51 |
|
52 @Override |
|
53 public Set<Association> associations() { |
|
54 throw new UnsupportedOperationException(message); |
|
55 } |
|
56 |
|
57 @Override |
|
58 public SctpMultiChannel bind(SocketAddress local, |
|
59 int backlog) throws IOException { |
|
60 throw new UnsupportedOperationException(message); |
|
61 } |
|
62 |
|
63 @Override |
|
64 public SctpMultiChannel bindAddress(InetAddress address) |
|
65 throws IOException { |
|
66 throw new UnsupportedOperationException(message); |
|
67 } |
|
68 |
|
69 @Override |
|
70 public SctpMultiChannel unbindAddress(InetAddress address) |
|
71 throws IOException { |
|
72 throw new UnsupportedOperationException(message); |
|
73 } |
|
74 |
|
75 @Override |
|
76 public Set<SocketAddress> getAllLocalAddresses() |
|
77 throws IOException { |
|
78 throw new UnsupportedOperationException(message); |
|
79 } |
|
80 |
|
81 @Override |
|
82 public Set<SocketAddress> getRemoteAddresses |
|
83 (Association association) throws IOException { |
|
84 throw new UnsupportedOperationException(message); |
|
85 } |
|
86 |
|
87 @Override |
|
88 public SctpMultiChannel shutdown(Association association) |
|
89 throws IOException { |
|
90 throw new UnsupportedOperationException(message); |
|
91 } |
|
92 |
|
93 @Override |
|
94 public <T> T getOption(SctpSocketOption<T> name, |
|
95 Association association) throws IOException { |
|
96 throw new UnsupportedOperationException(message); |
|
97 } |
|
98 |
|
99 @Override |
|
100 public <T> SctpMultiChannel setOption(SctpSocketOption<T> name, |
|
101 T value, Association association) throws IOException { |
|
102 throw new UnsupportedOperationException(message); |
|
103 } |
|
104 |
|
105 @Override |
|
106 public Set<SctpSocketOption<?>> supportedOptions() { |
|
107 throw new UnsupportedOperationException(message); |
|
108 } |
|
109 |
|
110 @Override |
|
111 public <T> MessageInfo receive(ByteBuffer buffer, T attachment, |
|
112 NotificationHandler<T> handler) throws IOException { |
|
113 throw new UnsupportedOperationException(message); |
|
114 } |
|
115 |
|
116 @Override |
|
117 public int send(ByteBuffer buffer, MessageInfo messageInfo) |
|
118 throws IOException { |
|
119 throw new UnsupportedOperationException(message); |
|
120 } |
|
121 |
|
122 @Override |
|
123 public SctpChannel branch(Association association) |
|
124 throws IOException { |
|
125 throw new UnsupportedOperationException(message); |
|
126 } |
|
127 |
|
128 @Override |
|
129 protected void implConfigureBlocking(boolean block) throws IOException { |
|
130 throw new UnsupportedOperationException(message); |
|
131 } |
|
132 |
|
133 @Override |
|
134 public void implCloseSelectableChannel() throws IOException { |
|
135 throw new UnsupportedOperationException(message); |
|
136 } |
|
137 } |