Module org.eclipse.jgit
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
AnSSLSocketFactorythat 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 newDelegatingSSLSocketFactorybased on the given delegate.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidconfigure(SSLSocket socket)Configure the newly created socket.SSLSocketcreateSocket()SSLSocketcreateSocket(String host, int port)SSLSocketcreateSocket(String host, int port, InetAddress localAddress, int localPort)SSLSocketcreateSocket(InetAddress host, int port)SSLSocketcreateSocket(InetAddress host, int port, InetAddress localAddress, int localPort)SSLSocketcreateSocket(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 newDelegatingSSLSocketFactorybased on the given delegate.- Parameters:
delegate-SSLSocketFactoryto delegate to
-
-
Method Detail
-
createSocket
public SSLSocket createSocket() throws IOException
- Overrides:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public SSLSocket createSocket(String host, int port) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public SSLSocket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public SSLSocket createSocket(InetAddress host, int port) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public SSLSocket createSocket(InetAddress host, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public SSLSocket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException
- Specified by:
createSocketin classSSLSocketFactory- Throws:
IOException
-
getDefaultCipherSuites
public String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuitesin classSSLSocketFactory
-
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin 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
-
-