Class SVNSocketFactory


  • public class SVNSocketFactory
    extends java.lang.Object
    SVNSocketFactory is a utility class that represents a custom socket factory which provides creating either a plain socket or a secure one to encrypt data transmitted over network.

    The created socket then used by the inner engine of SVNKit library to communicate with a Subversion repository.

    Version:
    1.3
    Author:
    TMate Software Ltd.
    • Constructor Detail

      • SVNSocketFactory

        public SVNSocketFactory()
    • Method Detail

      • createPlainSocket

        public static java.net.Socket createPlainSocket​(java.lang.String host,
                                                        int port,
                                                        int connectTimeout,
                                                        int readTimeout,
                                                        ISVNCanceller cancel)
                                                 throws java.io.IOException,
                                                        SVNException
        Throws:
        java.io.IOException
        SVNException
      • setSSLProtocols

        public static void setSSLProtocols​(java.lang.String sslProtocols)
      • getSSLProtocols

        public static java.lang.String getSSLProtocols()
      • createSSLSocket

        public static java.net.Socket createSSLSocket​(javax.net.ssl.KeyManager[] keyManagers,
                                                      javax.net.ssl.TrustManager trustManager,
                                                      java.lang.String host,
                                                      int port,
                                                      int connectTimeout,
                                                      int readTimeout,
                                                      ISVNCanceller cancel)
                                               throws java.io.IOException,
                                                      SVNException
        Throws:
        java.io.IOException
        SVNException
      • createSSLSocket

        public static java.net.Socket createSSLSocket​(javax.net.ssl.KeyManager[] keyManagers,
                                                      javax.net.ssl.TrustManager trustManager,
                                                      java.lang.String host,
                                                      int port,
                                                      java.net.Socket socket,
                                                      int readTimeout)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • connect

        public static void connect​(java.net.Socket socket,
                                   java.net.InetSocketAddress address,
                                   int timeout,
                                   ISVNCanceller cancel)
                            throws java.io.IOException,
                                   SVNException
        Throws:
        java.io.IOException
        SVNException
      • setSocketReceiveBufferSize

        public static void setSocketReceiveBufferSize​(int size)
      • getSocketReceiveBufferSize

        public static int getSocketReceiveBufferSize()
      • setSocketStaleCheckEnabled

        public static void setSocketStaleCheckEnabled​(boolean enabled)
      • isSocketStaleCheckEnabled

        public static boolean isSocketStaleCheckEnabled()
      • isSocketStale

        public static boolean isSocketStale​(java.net.Socket socket)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • createSSLContext

        public static javax.net.ssl.SSLContext createSSLContext​(javax.net.ssl.KeyManager[] keyManagers,
                                                                javax.net.ssl.TrustManager trustManager)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • configureSSLSocket

        public static java.net.Socket configureSSLSocket​(java.net.Socket socket)