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
FieldsModifier and TypeFieldDescriptionprivate static javax.net.ssl.KeyManager[]private static javax.net.ssl.X509TrustManagerprivate static booleanprivate static intprivate static java.lang.Stringprivate static ISVNThreadPool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate 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.SocketconfigureSSLSocket(java.net.Socket socket) static voidconnect(java.net.Socket socket, java.net.InetSocketAddress address, int timeout, ISVNCanceller cancel) private static java.net.InetAddresscreateAddres(java.lang.String hostName) static java.net.SocketcreatePlainSocket(java.lang.String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) static javax.net.ssl.SSLContextcreateSSLContext(javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager trustManager) private static javax.net.ssl.SSLContextcreateSSLContext(javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager[] trustManagers, java.util.List<java.lang.String> sslProtocols) static java.net.SocketcreateSSLSocket(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.SocketcreateSSLSocket(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 intstatic java.lang.Stringstatic ISVNThreadPoolstatic booleanisSocketStale(java.net.Socket socket) static booleanstatic voidsetSocketReceiveBufferSize(int size) static voidsetSocketStaleCheckEnabled(boolean enabled) static voidsetSSLProtocols(java.lang.String sslProtocols) private static java.net.SocketsetSSLSocketHost(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
-
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.IOExceptionSVNException
-
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.IOExceptionSVNException
-
_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.IOExceptionSVNException
-
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
-
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.IOExceptionSVNException
-
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.IOExceptionjava.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)
-