Package com.yahoo.vespa.athenz.identity
Class ServiceIdentitySslSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- com.yahoo.vespa.athenz.identity.ServiceIdentitySslSocketFactory
-
public class ServiceIdentitySslSocketFactory extends javax.net.ssl.SSLSocketFactory
ASSLSocketFactory
that creates sockets through theSSLContext
provided byServiceIdentityProvider
. Note: the implementation assumes that the set of default/supported cipher suites is static for a givenServiceIdentityProvider
instance.- Author:
- bjorncs
-
-
Constructor Summary
Constructors Constructor Description ServiceIdentitySslSocketFactory(ServiceIdentityProvider serviceIdentityProvider)
ServiceIdentitySslSocketFactory(java.util.function.Supplier<javax.net.ssl.SSLContext> sslContextSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.Socket
createSocket()
java.net.Socket
createSocket(java.lang.String host, int port)
java.net.Socket
createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)
java.net.Socket
createSocket(java.net.InetAddress host, int port)
java.net.Socket
createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)
java.net.Socket
createSocket(java.net.Socket s, java.io.InputStream consumed, boolean autoClose)
java.net.Socket
createSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose)
java.lang.String[]
getDefaultCipherSuites()
java.lang.String[]
getSupportedCipherSuites()
-
-
-
Constructor Detail
-
ServiceIdentitySslSocketFactory
public ServiceIdentitySslSocketFactory(ServiceIdentityProvider serviceIdentityProvider)
-
ServiceIdentitySslSocketFactory
public ServiceIdentitySslSocketFactory(java.util.function.Supplier<javax.net.ssl.SSLContext> sslContextSupplier)
-
-
Method Detail
-
getDefaultCipherSuites
public java.lang.String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuites
in classjavax.net.ssl.SSLSocketFactory
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classjavax.net.ssl.SSLSocketFactory
-
createSocket
public java.net.Socket createSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose) throws java.io.IOException
- Specified by:
createSocket
in classjavax.net.ssl.SSLSocketFactory
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
java.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException, java.net.UnknownHostException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
java.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOException
- Specified by:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.Socket s, java.io.InputStream consumed, boolean autoClose) throws java.io.IOException
- Overrides:
createSocket
in classjavax.net.ssl.SSLSocketFactory
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket() throws java.io.IOException
- Overrides:
createSocket
in classjavax.net.SocketFactory
- Throws:
java.io.IOException
-
-