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 X509TrustManagerprivate static booleanprivate static intprivate static Stringprivate 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 SocketconfigureSSLSocket(Socket socket) static voidconnect(Socket socket, InetSocketAddress address, int timeout, ISVNCanceller cancel) private static InetAddresscreateAddres(String hostName) static SocketcreatePlainSocket(String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) static SSLContextcreateSSLContext(KeyManager[] keyManagers, TrustManager trustManager) private static SSLContextcreateSSLContext(KeyManager[] keyManagers, TrustManager[] trustManagers, List<String> sslProtocols) static SocketcreateSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, int connectTimeout, int readTimeout, ISVNCanceller cancel) static SocketcreateSSLSocket(KeyManager[] keyManagers, TrustManager trustManager, String host, int port, Socket socket, int readTimeout) getEnabledSSLProtocols(boolean includeUserDefined) static intstatic Stringstatic ISVNThreadPoolstatic booleanisSocketStale(Socket socket) static booleanstatic voidsetSocketReceiveBufferSize(int size) static voidsetSocketStaleCheckEnabled(boolean enabled) static voidsetSSLProtocols(String sslProtocols) private static SocketsetSSLSocketHost(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:
IOExceptionSVNException
-
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:
IOExceptionSVNException
-
_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:
IOExceptionSVNException
-
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:
IOExceptionSVNException
-
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:
IOExceptionNoSuchAlgorithmException
-
getEnabledSSLProtocols
-
configureSSLSocket
-