Class DelegatingSSLSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- org.eclipse.jgit.internal.transport.http.DelegatingSSLSocketFactory
-
public abstract class DelegatingSSLSocketFactory extends SSLSocketFactory
AnSSLSocketFactory
that delegates to another factory and allows configuring the created socket viaconfigure(SSLSocket)
before it is returned.
-
-
Constructor Summary
Constructors Constructor Description DelegatingSSLSocketFactory(SSLSocketFactory delegate)
Creates a newDelegatingSSLSocketFactory
based on the given delegate.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
configure(SSLSocket socket)
Configure the newly created socket.SSLSocket
createSocket()
SSLSocket
createSocket(String host, int port)
SSLSocket
createSocket(String host, int port, InetAddress localAddress, int localPort)
SSLSocket
createSocket(InetAddress host, int port)
SSLSocket
createSocket(InetAddress host, int port, InetAddress localAddress, int localPort)
SSLSocket
createSocket(Socket socket, String host, int port, boolean autoClose)
String[]
getDefaultCipherSuites()
String[]
getSupportedCipherSuites()
-
Methods inherited from class javax.net.ssl.SSLSocketFactory
createSocket, getDefault
-
-
-
-
Constructor Detail
-
DelegatingSSLSocketFactory
public DelegatingSSLSocketFactory(SSLSocketFactory delegate)
Creates a newDelegatingSSLSocketFactory
based on the given delegate.- Parameters:
delegate
-SSLSocketFactory
to delegate to
-
-
Method Detail
-
createSocket
public SSLSocket createSocket() throws IOException
- Overrides:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public SSLSocket createSocket(String host, int port) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public SSLSocket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public SSLSocket createSocket(InetAddress host, int port) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public SSLSocket createSocket(InetAddress host, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public SSLSocket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException
- Specified by:
createSocket
in classSSLSocketFactory
- Throws:
IOException
-
getDefaultCipherSuites
public String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuites
in classSSLSocketFactory
-
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classSSLSocketFactory
-
configure
protected abstract void configure(SSLSocket socket) throws IOException
Configure the newly created socket.- Parameters:
socket
- to configure- Throws:
IOException
- if the socket cannot be configured
-
-