public class TestIPv6NIOServerSocketChannel extends Object
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
TestIPv6NIOServerSocketChannel() |
| Modifier and Type | Method and Description |
|---|---|
private void |
bindNIOServerSocket(InetAddress inetAddr)
Creates a NIO ServerSocketChannel, and gets the ServerSocket from
there.
|
private void |
bindServerSocket(InetAddress inetAddr)
Creates and binds a regular ServerSocket.
|
void |
ensurePreferIPv4()
Checks whether we are running with java.net.preferIPv4Stack=true
|
static void |
main(String[] args) |
void |
testServerSocket()
Checks whether we are effected by the JDK issue on windows, and if so
ensures that we are running with preferIPv4Stack=true.
|
void |
testServerSocketFromLocalhostResolution()
Tests whether every InetAddress we obtain by resolving can open a
ServerSocketChannel.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
public TestIPv6NIOServerSocketChannel()
private void bindServerSocket(InetAddress inetAddr) throws IOException
IOExceptionprivate void bindNIOServerSocket(InetAddress inetAddr) throws IOException
IOExceptionpublic void testServerSocket() throws IOException
IOExceptionpublic void ensurePreferIPv4() throws IOException
IOExceptionpublic void testServerSocketFromLocalhostResolution() throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.