Class SVNSocketFactory
java.lang.Object
org.tmatesoft.svn.core.internal.util.SVNSocketFactory
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
FieldsModifier and TypeFieldDescriptionprivate static KeyManager[]
private static X509TrustManager
private static boolean
private static int
private static String
private static ISVNThreadPool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Socket
_createSSLSocket
(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel, boolean withSNIsupport) static Socket
configureSSLSocket
(Socket socket) static void
connect
(Socket socket, InetSocketAddress address, int timeout, ISVNCanceller cancel) private static InetAddress
createAddres
(String hostName) static Socket
createPlainSocket
(String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) static SSLContext
createSSLContext
(KeyManager[] keyManagers, TrustManager trustManager) private static SSLContext
createSSLContext
(KeyManager[] keyManagers, TrustManager[] trustManagers, List<String> sslProtocols) static Socket
createSSLSocket
(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) static Socket
createSSLSocket
(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, Socket socket, int readTimeout) getEnabledSSLProtocols
(boolean includeUserDefined) static int
static String
static ISVNThreadPool
static boolean
isSocketStale
(Socket socket) static boolean
static void
setSocketReceiveBufferSize
(int size) static void
setSocketStaleCheckEnabled
(boolean enabled) static void
setSSLProtocols
(String sslProtocols) private static Socket
setSSLSocketHost
(Socket sslSocket, String host)
-
Field Details
-
ourIsSocketStaleCheck
private static boolean ourIsSocketStaleCheck -
ourSocketReceiveBufferSize
private static int ourSocketReceiveBufferSize -
ourThreadPool
-
ourSSLProtocols
-
EMPTY_TRUST_MANAGER
-
EMPTY_KEY_MANAGERS
-
-
Constructor Details
-
SVNSocketFactory
public SVNSocketFactory()
-
-
Method Details
-
createPlainSocket
public static Socket createPlainSocket(String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNException - Throws:
IOException
SVNException
-
setSSLProtocols
-
getSSLProtocols
-
createSSLSocket
public static Socket createSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) throws IOException, SVNException - Throws:
IOException
SVNException
-
_createSSLSocket
private static Socket _createSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel, boolean withSNIsupport) throws IOException, SVNException - Throws:
IOException
SVNException
-
createSSLSocket
public static Socket createSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, Socket socket, int readTimeout) throws IOException - Throws:
IOException
-
setSSLSocketHost
-
getThreadPool
-
connect
public static void connect(Socket socket, InetSocketAddress address, int timeout, ISVNCanceller cancel) throws IOException, SVNException - Throws:
IOException
SVNException
-
createAddres
- Throws:
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
- Throws:
IOException
-
createSSLContext
public static SSLContext createSSLContext(KeyManager[] keyManagers, TrustManager trustManager) throws IOException - Throws:
IOException
-
createSSLContext
private static SSLContext createSSLContext(KeyManager[] keyManagers, TrustManager[] trustManagers, List<String> sslProtocols) throws IOException, NoSuchAlgorithmException - Throws:
IOException
NoSuchAlgorithmException
-
getEnabledSSLProtocols
-
configureSSLSocket
-