Class SVNSocketFactory

java.lang.Object
org.tmatesoft.svn.core.internal.util.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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static javax.net.ssl.KeyManager[]
     
    private static javax.net.ssl.X509TrustManager
     
    private static boolean
     
    private static int
     
    private static java.lang.String
     
    private static ISVNThreadPool
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private 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, boolean withSNIsupport)
     
    static java.net.Socket
    configureSSLSocket(java.net.Socket socket)
     
    static void
    connect(java.net.Socket socket, java.net.InetSocketAddress address, int timeout, ISVNCanceller cancel)
     
    private static java.net.InetAddress
    createAddres(java.lang.String hostName)
     
    static java.net.Socket
    createPlainSocket(java.lang.String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel)
     
    static javax.net.ssl.SSLContext
    createSSLContext(javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager trustManager)
     
    private static javax.net.ssl.SSLContext
    createSSLContext(javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager[] trustManagers, java.util.List<java.lang.String> sslProtocols)
     
    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)
     
    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)
     
    private static final java.util.List<java.lang.String>
    getEnabledSSLProtocols(boolean includeUserDefined)
     
    static int
     
    static java.lang.String
     
     
    static boolean
    isSocketStale(java.net.Socket socket)
     
    static boolean
     
    static void
     
    static void
    setSocketStaleCheckEnabled(boolean enabled)
     
    static void
    setSSLProtocols(java.lang.String sslProtocols)
     
    private static java.net.Socket
    setSSLSocketHost(java.net.Socket sslSocket, java.lang.String host)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ourIsSocketStaleCheck

      private static boolean ourIsSocketStaleCheck
    • ourSocketReceiveBufferSize

      private static int ourSocketReceiveBufferSize
    • ourThreadPool

      private static ISVNThreadPool ourThreadPool
    • ourSSLProtocols

      private static java.lang.String ourSSLProtocols
    • EMPTY_TRUST_MANAGER

      private static javax.net.ssl.X509TrustManager EMPTY_TRUST_MANAGER
    • EMPTY_KEY_MANAGERS

      private static javax.net.ssl.KeyManager[] EMPTY_KEY_MANAGERS
  • Constructor Details

    • SVNSocketFactory

      public SVNSocketFactory()
  • Method Details

    • 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

      private 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, boolean withSNIsupport) 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
    • setSSLSocketHost

      private static java.net.Socket setSSLSocketHost(java.net.Socket sslSocket, java.lang.String host)
    • getThreadPool

      public static ISVNThreadPool getThreadPool()
    • 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
    • createAddres

      private static java.net.InetAddress createAddres(java.lang.String hostName) throws java.net.UnknownHostException
      Throws:
      java.net.UnknownHostException
    • 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
    • createSSLContext

      private static javax.net.ssl.SSLContext createSSLContext(javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager[] trustManagers, java.util.List<java.lang.String> sslProtocols) throws java.io.IOException, java.security.NoSuchAlgorithmException
      Throws:
      java.io.IOException
      java.security.NoSuchAlgorithmException
    • getEnabledSSLProtocols

      private static final java.util.List<java.lang.String> getEnabledSSLProtocols(boolean includeUserDefined)
    • configureSSLSocket

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