Revert java6 NIO compatibility. Netty requires java7 because the
classloader cannot load certain classes (because of recursion issues)
This commit is contained in:
parent
64df20fcdf
commit
ca28a7d908
@ -11,6 +11,7 @@ import com.barchart.udt.SocketUDT;
|
|||||||
import com.barchart.udt.TypeUDT;
|
import com.barchart.udt.TypeUDT;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.ProtocolFamily;
|
||||||
import java.nio.channels.DatagramChannel;
|
import java.nio.channels.DatagramChannel;
|
||||||
import java.nio.channels.Pipe;
|
import java.nio.channels.Pipe;
|
||||||
import java.nio.channels.spi.SelectorProvider;
|
import java.nio.channels.spi.SelectorProvider;
|
||||||
@ -79,6 +80,11 @@ public class SelectorProviderUDT extends SelectorProvider {
|
|||||||
throw new UnsupportedOperationException("feature not available");
|
throw new UnsupportedOperationException("feature not available");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DatagramChannel openDatagramChannel(final ProtocolFamily family) throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not supported.
|
* Not supported.
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,10 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.SocketAddress;
|
||||||
|
import java.net.SocketOption;
|
||||||
import java.nio.channels.ServerSocketChannel;
|
import java.nio.channels.ServerSocketChannel;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ServerSocketChannel}-like wrapper for {@link SocketUDT} can be either
|
* {@link ServerSocketChannel}-like wrapper for {@link SocketUDT} can be either
|
||||||
@ -109,6 +112,26 @@ public class ServerSocketChannelUDT extends ServerSocketChannel implements Chann
|
|||||||
return (SelectorProviderUDT) super.provider();
|
return (SelectorProviderUDT) super.provider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServerSocketChannel bind(final SocketAddress local, final int backlog) throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> ServerSocketChannel setOption(final SocketOption<T> name, final T value) throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> T getOption(final SocketOption<T> name) throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<SocketOption<?>> supportedOptions() {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized NioServerSocketUDT socket() {
|
public synchronized NioServerSocketUDT socket() {
|
||||||
if (socketAdapter == null) {
|
if (socketAdapter == null) {
|
||||||
@ -136,4 +159,9 @@ public class ServerSocketChannelUDT extends ServerSocketChannel implements Chann
|
|||||||
public TypeUDT typeUDT() {
|
public TypeUDT typeUDT() {
|
||||||
return providerUDT().type();
|
return providerUDT().type();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SocketAddress getLocalAddress() throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
|
import java.net.SocketOption;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.channels.ClosedChannelException;
|
import java.nio.channels.ClosedChannelException;
|
||||||
import java.nio.channels.ConnectionPendingException;
|
import java.nio.channels.ConnectionPendingException;
|
||||||
import java.nio.channels.IllegalBlockingModeException;
|
import java.nio.channels.IllegalBlockingModeException;
|
||||||
import java.nio.channels.SocketChannel;
|
import java.nio.channels.SocketChannel;
|
||||||
import java.nio.channels.UnresolvedAddressException;
|
import java.nio.channels.UnresolvedAddressException;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link SocketChannel}-like wrapper for {@link SocketUDT}, can be either
|
* {@link SocketChannel}-like wrapper for {@link SocketUDT}, can be either
|
||||||
@ -74,8 +76,6 @@ public class SocketChannelUDT extends SocketChannel implements ChannelUDT {
|
|||||||
|
|
||||||
protected final SocketUDT socketUDT;
|
protected final SocketUDT socketUDT;
|
||||||
|
|
||||||
private SocketAddress localAddress;
|
|
||||||
|
|
||||||
private InetSocketAddress remoteSocket;
|
private InetSocketAddress remoteSocket;
|
||||||
|
|
||||||
protected SocketChannelUDT( //
|
protected SocketChannelUDT( //
|
||||||
@ -242,13 +242,10 @@ public class SocketChannelUDT extends SocketChannel implements ChannelUDT {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public SocketAddress getRemoteAddress() throws IOException {
|
public SocketAddress getRemoteAddress() throws IOException {
|
||||||
// if(this.isConnectFinished()) {
|
throw new UnsupportedOperationException("feature not available");
|
||||||
// return remoteSocket;
|
}
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void implCloseSelectableChannel() throws IOException {
|
protected void implCloseSelectableChannel() throws IOException {
|
||||||
@ -533,11 +530,33 @@ public class SocketChannelUDT extends SocketChannel implements ChannelUDT {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public SocketAddress getLocalAddress() throws IOException {
|
public <T> SocketChannel setOption(final SocketOption<T> name, final T value) throws IOException {
|
||||||
// if(this.isConnected()) {
|
throw new UnsupportedOperationException("feature not available");
|
||||||
// return localAddress;
|
}
|
||||||
// }
|
|
||||||
// return null;
|
@Override
|
||||||
// }
|
public <T> T getOption(final SocketOption<T> name) throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<SocketOption<?>> supportedOptions() {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SocketChannel shutdownInput() throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SocketChannel shutdownOutput() throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SocketAddress getLocalAddress() throws IOException {
|
||||||
|
throw new UnsupportedOperationException("feature not available");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user