jdk/src/windows/classes/sun/nio/ch/SctpMultiChannelImpl.java
author chegar
Thu, 16 Apr 2009 17:42:00 +0100
changeset 2542 d859108aea12
child 5506 202f599c92aa
permissions -rw-r--r--
4927640: Implementation of the sctp protocol Summary: An implementation-specific API for the Stream Control Transmission Protocol Reviewed-by: alanb, michaelm, jccollet
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2542
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     1
/*
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     2
 * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     4
 *
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    10
 *
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    15
 * accompanied this code).
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    16
 *
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    20
 *
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    23
 * have any questions.
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    24
 */
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    25
package sun.nio.ch;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    26
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    27
import java.net.SocketAddress;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    28
import java.net.InetAddress;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    29
import java.io.IOException;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    30
import java.util.Set;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    31
import java.nio.ByteBuffer;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    32
import java.nio.channels.spi.SelectorProvider;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    33
import com.sun.nio.sctp.Association;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    34
import com.sun.nio.sctp.SctpChannel;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    35
import com.sun.nio.sctp.MessageInfo;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    36
import com.sun.nio.sctp.NotificationHandler;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    37
import com.sun.nio.sctp.SctpMultiChannel;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    38
import com.sun.nio.sctp.SctpSocketOption;
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    39
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    40
/**
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    41
 * Unimplemented.
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    42
 */
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    43
public class SctpMultiChannelImpl extends SctpMultiChannel
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    44
{
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    45
    private static final String message = "SCTP not supported on this platform";
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    46
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    47
    public SctpMultiChannelImpl(SelectorProvider provider) {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    48
        super(provider);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    49
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    50
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    51
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    52
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    53
    public Set<Association> associations() {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    54
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    55
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    56
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    57
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    58
    public SctpMultiChannel bind(SocketAddress local,
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    59
            int backlog) throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    60
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    61
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    62
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    63
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    64
    public SctpMultiChannel bindAddress(InetAddress address)
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    65
         throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    66
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    67
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    68
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    69
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    70
    public SctpMultiChannel unbindAddress(InetAddress address)
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    71
         throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    72
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    73
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    74
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    75
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    76
    public Set<SocketAddress> getAllLocalAddresses()
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    77
            throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    78
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    79
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    80
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    81
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    82
    public Set<SocketAddress> getRemoteAddresses
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    83
            (Association association) throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    84
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    85
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    86
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    87
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    88
    public SctpMultiChannel shutdown(Association association)
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    89
            throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    90
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    91
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    92
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    93
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    94
    public <T> T getOption(SctpSocketOption<T> name,
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    95
            Association association) throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    96
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    97
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    98
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
    99
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   100
    public <T> SctpMultiChannel setOption(SctpSocketOption<T> name,
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   101
            T value, Association association) throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   102
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   103
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   104
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   105
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   106
    public Set<SctpSocketOption<?>> supportedOptions() {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   107
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   108
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   109
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   110
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   111
    public <T> MessageInfo receive(ByteBuffer buffer, T attachment,
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   112
            NotificationHandler<T> handler) throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   113
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   114
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   115
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   116
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   117
    public int send(ByteBuffer buffer, MessageInfo messageInfo)
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   118
            throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   119
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   120
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   121
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   122
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   123
    public SctpChannel branch(Association association)
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   124
            throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   125
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   126
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   127
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   128
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   129
    protected void implConfigureBlocking(boolean block) throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   130
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   131
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   132
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   133
    @Override
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   134
    public void implCloseSelectableChannel() throws IOException {
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   135
        throw new UnsupportedOperationException(message);
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   136
    }
d859108aea12 4927640: Implementation of the sctp protocol
chegar
parents:
diff changeset
   137
}