8297822: De-duplicate code in module jdk.sctp
Reviewed-by: dfuchs, rriggs
This commit is contained in:
parent
fabda24696
commit
56c438bfc2
@ -44,3 +44,10 @@ endif
|
|||||||
ifeq ($(call isTargetOs, aix), true)
|
ifeq ($(call isTargetOs, aix), true)
|
||||||
EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
|
EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(call isTargetOsType, unix), true)
|
||||||
|
ifeq ($(call isTargetOs, macos aix), false)
|
||||||
|
# This class is not needed on "unix" because SCTP in Java is supported for that platform
|
||||||
|
EXCLUDE_FILES += $(TOPDIR)/src/jdk.sctp/share/classes/sun/nio/ch/sctp/UnsupportedUtil.java
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
@ -1,137 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
package sun.nio.ch.sctp;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.Association;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
|
||||||
import com.sun.nio.sctp.NotificationHandler;
|
|
||||||
import com.sun.nio.sctp.SctpMultiChannel;
|
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unimplemented.
|
|
||||||
*/
|
|
||||||
public class SctpMultiChannelImpl extends SctpMultiChannel
|
|
||||||
{
|
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpMultiChannelImpl(SelectorProvider provider) {
|
|
||||||
super(provider);
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Association> associations() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel bind(SocketAddress local,
|
|
||||||
int backlog) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel bindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel unbindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getRemoteAddresses
|
|
||||||
(Association association) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel shutdown(Association association)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getOption(SctpSocketOption<T> name,
|
|
||||||
Association association) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> SctpMultiChannel setOption(SctpSocketOption<T> name,
|
|
||||||
T value, Association association) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> MessageInfo receive(ByteBuffer buffer, T attachment,
|
|
||||||
NotificationHandler<T> handler) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int send(ByteBuffer buffer, MessageInfo messageInfo)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel branch(Association association)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
package sun.nio.ch.sctp;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.SctpServerChannel;
|
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unimplemented.
|
|
||||||
*/
|
|
||||||
public class SctpServerChannelImpl extends SctpServerChannel
|
|
||||||
{
|
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpServerChannelImpl(SelectorProvider provider) {
|
|
||||||
super(provider);
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel accept() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpServerChannel bind(SocketAddress local,
|
|
||||||
int backlog) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpServerChannel bindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpServerChannel unbindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getOption(SctpSocketOption<T> name) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> SctpServerChannel setOption(SctpSocketOption<T> name,
|
|
||||||
T value) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,150 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
package sun.nio.ch.sctp;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.Association;
|
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
|
||||||
import com.sun.nio.sctp.NotificationHandler;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unimplemented.
|
|
||||||
*/
|
|
||||||
public class SctpChannelImpl extends SctpChannel
|
|
||||||
{
|
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpChannelImpl(SelectorProvider provider) {
|
|
||||||
super(provider);
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Association association() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel bind(SocketAddress local)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel bindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel unbindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean connect(SocketAddress remote) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean connect(SocketAddress remote, int maxOutStreams,
|
|
||||||
int maxInStreams) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isConnectionPending() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean finishConnect() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getRemoteAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel shutdown() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getOption(SctpSocketOption<T> name)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> SctpChannel setOption(SctpSocketOption<T> name, T value)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> MessageInfo receive(ByteBuffer dst, T attachment,
|
|
||||||
NotificationHandler<T> handler) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int send(ByteBuffer src, MessageInfo messageInfo)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,137 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
package sun.nio.ch.sctp;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.Association;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
|
||||||
import com.sun.nio.sctp.NotificationHandler;
|
|
||||||
import com.sun.nio.sctp.SctpMultiChannel;
|
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unimplemented.
|
|
||||||
*/
|
|
||||||
public class SctpMultiChannelImpl extends SctpMultiChannel
|
|
||||||
{
|
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpMultiChannelImpl(SelectorProvider provider) {
|
|
||||||
super(provider);
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Association> associations() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel bind(SocketAddress local,
|
|
||||||
int backlog) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel bindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel unbindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getRemoteAddresses
|
|
||||||
(Association association) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpMultiChannel shutdown(Association association)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getOption(SctpSocketOption<T> name,
|
|
||||||
Association association) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> SctpMultiChannel setOption(SctpSocketOption<T> name,
|
|
||||||
T value, Association association) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> MessageInfo receive(ByteBuffer buffer, T attachment,
|
|
||||||
NotificationHandler<T> handler) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int send(ByteBuffer buffer, MessageInfo messageInfo)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel branch(Association association)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
package sun.nio.ch.sctp;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.SctpServerChannel;
|
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unimplemented.
|
|
||||||
*/
|
|
||||||
public class SctpServerChannelImpl extends SctpServerChannel
|
|
||||||
{
|
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpServerChannelImpl(SelectorProvider provider) {
|
|
||||||
super(provider);
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel accept() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpServerChannel bind(SocketAddress local,
|
|
||||||
int backlog) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpServerChannel bindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpServerChannel unbindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getOption(SctpSocketOption<T> name) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> SctpServerChannel setOption(SctpSocketOption<T> name,
|
|
||||||
T value) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -24,127 +24,123 @@
|
|||||||
*/
|
*/
|
||||||
package sun.nio.ch.sctp;
|
package sun.nio.ch.sctp;
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.Association;
|
import com.sun.nio.sctp.Association;
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
import com.sun.nio.sctp.MessageInfo;
|
||||||
import com.sun.nio.sctp.NotificationHandler;
|
import com.sun.nio.sctp.NotificationHandler;
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
import com.sun.nio.sctp.SctpChannel;
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
import com.sun.nio.sctp.SctpSocketOption;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.SocketAddress;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.channels.spi.SelectorProvider;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unimplemented.
|
* Unimplemented.
|
||||||
*/
|
*/
|
||||||
public class SctpChannelImpl extends SctpChannel
|
public class SctpChannelImpl
|
||||||
{
|
extends SctpChannel {
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpChannelImpl(SelectorProvider provider) {
|
public SctpChannelImpl(SelectorProvider provider) {
|
||||||
super(provider);
|
super(provider);
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Association association() {
|
public Association association() {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpChannel bind(SocketAddress local)
|
public SctpChannel bind(SocketAddress local) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpChannel bindAddress(InetAddress address)
|
public SctpChannel bindAddress(InetAddress address) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpChannel unbindAddress(InetAddress address)
|
public SctpChannel unbindAddress(InetAddress address) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean connect(SocketAddress remote) throws IOException {
|
public boolean connect(SocketAddress remote) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean connect(SocketAddress remote, int maxOutStreams,
|
public boolean connect(SocketAddress remote,
|
||||||
int maxInStreams) throws IOException {
|
int maxOutStreams,
|
||||||
throw new UnsupportedOperationException(message);
|
int maxInStreams) throws IOException {
|
||||||
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isConnectionPending() {
|
public boolean isConnectionPending() {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean finishConnect() throws IOException {
|
public boolean finishConnect() throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
public Set<SocketAddress> getAllLocalAddresses() throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SocketAddress> getRemoteAddresses()
|
public Set<SocketAddress> getRemoteAddresses() throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpChannel shutdown() throws IOException {
|
public SctpChannel shutdown() throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T getOption(SctpSocketOption<T> name)
|
public <T> T getOption(SctpSocketOption<T> name) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> SctpChannel setOption(SctpSocketOption<T> name, T value)
|
public <T> SctpChannel setOption(SctpSocketOption<T> name,
|
||||||
throws IOException {
|
T value) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
public Set<SctpSocketOption<?>> supportedOptions() {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> MessageInfo receive(ByteBuffer dst, T attachment,
|
public <T> MessageInfo receive(ByteBuffer dst,
|
||||||
NotificationHandler<T> handler) throws IOException {
|
T attachment,
|
||||||
throw new UnsupportedOperationException(message);
|
NotificationHandler<T> handler) throws IOException {
|
||||||
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int send(ByteBuffer src, MessageInfo messageInfo)
|
public int send(ByteBuffer src,
|
||||||
throws IOException {
|
MessageInfo messageInfo) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
protected void implConfigureBlocking(boolean block) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
public void implCloseSelectableChannel() throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -24,114 +24,110 @@
|
|||||||
*/
|
*/
|
||||||
package sun.nio.ch.sctp;
|
package sun.nio.ch.sctp;
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.Association;
|
import com.sun.nio.sctp.Association;
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
import com.sun.nio.sctp.MessageInfo;
|
||||||
import com.sun.nio.sctp.NotificationHandler;
|
import com.sun.nio.sctp.NotificationHandler;
|
||||||
|
import com.sun.nio.sctp.SctpChannel;
|
||||||
import com.sun.nio.sctp.SctpMultiChannel;
|
import com.sun.nio.sctp.SctpMultiChannel;
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
import com.sun.nio.sctp.SctpSocketOption;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.SocketAddress;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.channels.spi.SelectorProvider;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unimplemented.
|
* Unimplemented.
|
||||||
*/
|
*/
|
||||||
public class SctpMultiChannelImpl extends SctpMultiChannel
|
public class SctpMultiChannelImpl
|
||||||
{
|
extends SctpMultiChannel {
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpMultiChannelImpl(SelectorProvider provider) {
|
public SctpMultiChannelImpl(SelectorProvider provider) {
|
||||||
super(provider);
|
super(provider);
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Association> associations() {
|
public Set<Association> associations() {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpMultiChannel bind(SocketAddress local,
|
public SctpMultiChannel bind(SocketAddress local,
|
||||||
int backlog) throws IOException {
|
int backlog) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpMultiChannel bindAddress(InetAddress address)
|
public SctpMultiChannel bindAddress(InetAddress address) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpMultiChannel unbindAddress(InetAddress address)
|
public SctpMultiChannel unbindAddress(InetAddress address) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
public Set<SocketAddress> getAllLocalAddresses() throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SocketAddress> getRemoteAddresses
|
public Set<SocketAddress> getRemoteAddresses(Association association) throws IOException {
|
||||||
(Association association) throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpMultiChannel shutdown(Association association)
|
public SctpMultiChannel shutdown(Association association) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T getOption(SctpSocketOption<T> name,
|
public <T> T getOption(SctpSocketOption<T> name,
|
||||||
Association association) throws IOException {
|
Association association) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> SctpMultiChannel setOption(SctpSocketOption<T> name,
|
public <T> SctpMultiChannel setOption(SctpSocketOption<T> name,
|
||||||
T value, Association association) throws IOException {
|
T value,
|
||||||
throw new UnsupportedOperationException(message);
|
Association association) throws IOException {
|
||||||
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
public Set<SctpSocketOption<?>> supportedOptions() {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> MessageInfo receive(ByteBuffer buffer, T attachment,
|
public <T> MessageInfo receive(ByteBuffer buffer,
|
||||||
NotificationHandler<T> handler) throws IOException {
|
T attachment,
|
||||||
throw new UnsupportedOperationException(message);
|
NotificationHandler<T> handler) throws IOException {
|
||||||
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int send(ByteBuffer buffer, MessageInfo messageInfo)
|
public int send(ByteBuffer buffer,
|
||||||
throws IOException {
|
MessageInfo messageInfo) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpChannel branch(Association association)
|
public SctpChannel branch(Association association) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
protected void implConfigureBlocking(boolean block) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
public void implCloseSelectableChannel() throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -24,79 +24,76 @@
|
|||||||
*/
|
*/
|
||||||
package sun.nio.ch.sctp;
|
package sun.nio.ch.sctp;
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
import com.sun.nio.sctp.SctpChannel;
|
||||||
import com.sun.nio.sctp.SctpServerChannel;
|
import com.sun.nio.sctp.SctpServerChannel;
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
import com.sun.nio.sctp.SctpSocketOption;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.SocketAddress;
|
||||||
|
import java.nio.channels.spi.SelectorProvider;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unimplemented.
|
* Unimplemented.
|
||||||
*/
|
*/
|
||||||
public class SctpServerChannelImpl extends SctpServerChannel
|
public class SctpServerChannelImpl
|
||||||
{
|
extends SctpServerChannel {
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpServerChannelImpl(SelectorProvider provider) {
|
public SctpServerChannelImpl(SelectorProvider provider) {
|
||||||
super(provider);
|
super(provider);
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpChannel accept() throws IOException {
|
public SctpChannel accept() throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpServerChannel bind(SocketAddress local,
|
public SctpServerChannel bind(SocketAddress local,
|
||||||
int backlog) throws IOException {
|
int backlog) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpServerChannel bindAddress(InetAddress address)
|
public SctpServerChannel bindAddress(InetAddress address) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SctpServerChannel unbindAddress(InetAddress address)
|
public SctpServerChannel unbindAddress(InetAddress address) throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
public Set<SocketAddress> getAllLocalAddresses() throws IOException {
|
||||||
throws IOException {
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T getOption(SctpSocketOption<T> name) throws IOException {
|
public <T> T getOption(SctpSocketOption<T> name) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> SctpServerChannel setOption(SctpSocketOption<T> name,
|
public <T> SctpServerChannel setOption(SctpSocketOption<T> name,
|
||||||
T value) throws IOException {
|
T value) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
public Set<SctpSocketOption<?>> supportedOptions() {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
protected void implConfigureBlocking(boolean block) throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
public void implCloseSelectableChannel() throws IOException {
|
||||||
throw new UnsupportedOperationException(message);
|
throw UnsupportedUtil.sctpUnsupported();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package sun.nio.ch.sctp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility class used by implementations on platforms <em>not</em> supporting SCTP.
|
||||||
|
* <p>
|
||||||
|
* This class is not present on the "unix" platform because unix can support SCTP.
|
||||||
|
*/
|
||||||
|
public final class UnsupportedUtil {
|
||||||
|
|
||||||
|
private static final String MESSAGE = "SCTP not supported on this platform";
|
||||||
|
|
||||||
|
// Suppresses default constructor, ensuring non-instantiability.
|
||||||
|
private UnsupportedUtil() {}
|
||||||
|
|
||||||
|
static UnsupportedOperationException sctpUnsupported() {
|
||||||
|
return new UnsupportedOperationException(MESSAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,150 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
package sun.nio.ch.sctp;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
|
||||||
import com.sun.nio.sctp.Association;
|
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
|
||||||
import com.sun.nio.sctp.NotificationHandler;
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
|
||||||
import com.sun.nio.sctp.SctpSocketOption;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unimplemented.
|
|
||||||
*/
|
|
||||||
public class SctpChannelImpl extends SctpChannel
|
|
||||||
{
|
|
||||||
private static final String message = "SCTP not supported on this platform";
|
|
||||||
|
|
||||||
public SctpChannelImpl(SelectorProvider provider) {
|
|
||||||
super(provider);
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Association association() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel bind(SocketAddress local)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel bindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel unbindAddress(InetAddress address)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean connect(SocketAddress remote) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean connect(SocketAddress remote, int maxOutStreams,
|
|
||||||
int maxInStreams) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isConnectionPending() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean finishConnect() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getAllLocalAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SocketAddress> getRemoteAddresses()
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SctpChannel shutdown() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getOption(SctpSocketOption<T> name)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> SctpChannel setOption(SctpSocketOption<T> name, T value)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<SctpSocketOption<?>> supportedOptions() {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> MessageInfo receive(ByteBuffer dst, T attachment,
|
|
||||||
NotificationHandler<T> handler) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int send(ByteBuffer src, MessageInfo messageInfo)
|
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void implConfigureBlocking(boolean block) throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void implCloseSelectableChannel() throws IOException {
|
|
||||||
throw new UnsupportedOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user