Java Code Examples for java.net.SocketException#initCause()

The following examples show how to use java.net.SocketException#initCause() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UnixDomainSocketAcceptanceTest.java    From mongodb-async-driver with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a org.newsclub.net.unix.AFUNIXSocket via reflection.
 */
@Override
public Socket createSocket() throws java.io.IOException {
    try {
        final Class<?> clazz = ourJUnixSocketLibClassLoader
                .loadClass("org.newsclub.net.unix.AFUNIXSocket");

        return (Socket) clazz.getMethod("newInstance").invoke(null);
    }
    catch (final Exception error) {
        final SocketException socketError = new SocketException(
                error.getMessage());
        socketError.initCause(error);
        throw socketError;
    }
}
 
Example 2
Source File: SocketFactory.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 3
Source File: SocketFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 4
Source File: SocketFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 5
Source File: SocketFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 6
Source File: SocketFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 7
Source File: SocketFactory.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 8
Source File: SocketFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 9
Source File: SocketFactory.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 10
Source File: SocketFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 11
Source File: SocketFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 12
Source File: SocketFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 13
Source File: SocketFactory.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 14
Source File: SocketFactory.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 15
Source File: SocketFactory.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}
 
Example 16
Source File: SocketFactory.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an unconnected socket.
 *
 * @return the unconnected socket
 * @throws IOException if the socket cannot be created
 * @see java.net.Socket#connect(java.net.SocketAddress)
 * @see java.net.Socket#connect(java.net.SocketAddress, int)
 * @see java.net.Socket#Socket()
 */
public Socket createSocket() throws IOException {
    //
    // bug 6771432:
    // The Exception is used by HttpsClient to signal that
    // unconnected sockets have not been implemented.
    //
    UnsupportedOperationException uop = new
            UnsupportedOperationException();
    SocketException se =  new SocketException(
            "Unconnected sockets not implemented");
    se.initCause(uop);
    throw se;
}