Top Description Fields Constructors Methods
org.conscrypt

pack-priv final Class OpenSSLServerSocketFactoryImpl

extends SSLServerSocketFactory
Class Inheritance
Imports
java.io.IOException, java.net.InetAddress, .ServerSocket, javax.net.ServerSocketFactory, java.security.KeyManagementException, javax.net.ssl.SSLServerSocketFactory

An implementation of SSLServerSocketFactory using BoringSSL.

This name of this class cannot change in order to maintain backward-compatibility with GMS core ProviderInstallerImpl

Field Summary

Modifier and TypeField and Description
private IOException
private SSLParametersImpl
private boolean
private static boolean

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ServerSocket
createServerSocket()

Overrides javax.net.ServerSocketFactory.createServerSocket.

Returns an unbound server socket.
public ServerSocket
createServerSocket(int
the port to listen to
port
)

Implements abstract javax.net.ServerSocketFactory.createServerSocket.

Returns a server socket bound to the specified port.
public ServerSocket
createServerSocket(int
the port to listen to
port
,
int
how many connections are queued
backlog
)

Implements abstract javax.net.ServerSocketFactory.createServerSocket.

Returns a server socket bound to the specified port, and uses the specified connection backlog.
public ServerSocket
createServerSocket(int
the port to listen to
port
,
int
how many connections are queued
backlog
,
InetAddress
the network interface address to use
iAddress
)

Implements abstract javax.net.ServerSocketFactory.createServerSocket.

Returns a server socket bound to the specified port, with a specified listen backlog and local IP.
public String[]
getDefaultCipherSuites()

Implements abstract javax.net.ssl.SSLServerSocketFactory.getDefaultCipherSuites.

Returns the list of cipher suites which are enabled by default.
public String[]
getSupportedCipherSuites()

Implements abstract javax.net.ssl.SSLServerSocketFactory.getSupportedCipherSuites.

Returns the names of the cipher suites which could be enabled for use on an SSL connection created by this factory.
pack-priv void
setUseEngineSocket(boolean useEngineSocket)

Configures the socket to be created for this instance.

pack-priv static void
setUseEngineSocketByDefault(boolean useEngineSocket)

Configures the default socket type to be created for the default and all new instances.

Inherited from javax.net.ssl.SSLServerSocketFactory:
getDefault

Field Detail

instantiationExceptionback to summary
private IOException instantiationException
sslParametersback to summary
private SSLParametersImpl sslParameters
useEngineSocketback to summary
private boolean useEngineSocket
useEngineSocketByDefaultback to summary
private static boolean useEngineSocketByDefault

Constructor Detail

OpenSSLServerSocketFactoryImplback to summary
pack-priv OpenSSLServerSocketFactoryImpl()
OpenSSLServerSocketFactoryImplback to summary
pack-priv OpenSSLServerSocketFactoryImpl(SSLParametersImpl sslParameters)

Method Detail

createServerSocketback to summary
public ServerSocket createServerSocket() throws IOException

Overrides javax.net.ServerSocketFactory.createServerSocket.

Doc from javax.net.ServerSocketFactory.createServerSocket.

Returns an unbound server socket. The socket is configured with the socket options (such as accept timeout) given to this factory.

Returns:ServerSocket

the unbound socket

Annotations
@Override
Exceptions
IOException:
if the socket cannot be created
createServerSocketback to summary
public ServerSocket createServerSocket(int port) throws IOException

Implements abstract javax.net.ServerSocketFactory.createServerSocket.

Doc from javax.net.ServerSocketFactory.createServerSocket.

Returns a server socket bound to the specified port. The socket is configured with the socket options (such as accept timeout) given to this factory.

If there is a security manager, its checkListen method is called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters
port:int

the port to listen to

Returns:ServerSocket

the ServerSocket

Annotations
@Override
Exceptions
IOException:
for networking errors
createServerSocketback to summary
public ServerSocket createServerSocket(int port, int backlog) throws IOException

Implements abstract javax.net.ServerSocketFactory.createServerSocket.

Doc from javax.net.ServerSocketFactory.createServerSocket.

Returns a server socket bound to the specified port, and uses the specified connection backlog. The socket is configured with the socket options (such as accept timeout) given to this factory.

The backlog argument must be a positive value greater than 0. If the value passed if equal or less than 0, then the default value will be assumed.

If there is a security manager, its checkListen method is called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters
port:int

the port to listen to

backlog:int

how many connections are queued

Returns:ServerSocket

the ServerSocket

Annotations
@Override
Exceptions
IOException:
for networking errors
createServerSocketback to summary
public ServerSocket createServerSocket(int port, int backlog, InetAddress iAddress) throws IOException

Implements abstract javax.net.ServerSocketFactory.createServerSocket.

Doc from javax.net.ServerSocketFactory.createServerSocket.

Returns a server socket bound to the specified port, with a specified listen backlog and local IP.

The ifAddress argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If ifAddress is null, it will accept connections on all local addresses. The socket is configured with the socket options (such as accept timeout) given to this factory.

The backlog argument must be a positive value greater than 0. If the value passed if equal or less than 0, then the default value will be assumed.

If there is a security manager, its checkListen method is called with the port argument as its argument to ensure the operation is allowed. This could result in a SecurityException.

Parameters
port:int

the port to listen to

backlog:int

how many connections are queued

iAddress:InetAddress

the network interface address to use

Returns:ServerSocket

the ServerSocket

Annotations
@Override
Exceptions
IOException:
for networking errors
getDefaultCipherSuitesback to summary
public String[] getDefaultCipherSuites()

Implements abstract javax.net.ssl.SSLServerSocketFactory.getDefaultCipherSuites.

Doc from javax.net.ssl.SSLServerSocketFactory.getDefaultCipherSuites.

Returns the list of cipher suites which are enabled by default. Unless a different list is enabled, handshaking on an SSL connection will use one of these cipher suites. The minimum quality of service for these defaults requires confidentiality protection and server authentication (that is, no anonymous cipher suites).

The returned array includes cipher suites from the list of standard cipher suite names in the JSSE Cipher Suite Names section of the Java Security Standard Algorithm Names Specification, and may also include other cipher suites that the provider supports.

Returns:String[]

array of the cipher suites enabled by default

Annotations
@Override
getSupportedCipherSuitesback to summary
public String[] getSupportedCipherSuites()

Implements abstract javax.net.ssl.SSLServerSocketFactory.getSupportedCipherSuites.

Doc from javax.net.ssl.SSLServerSocketFactory.getSupportedCipherSuites.

Returns the names of the cipher suites which could be enabled for use on an SSL connection created by this factory. Normally, only a subset of these will actually be enabled by default, since this list may include cipher suites which do not meet quality of service requirements for those defaults. Such cipher suites are useful in specialized applications.

The returned array includes cipher suites from the list of standard cipher suite names in the JSSE Cipher Suite Names section of the Java Security Standard Algorithm Names Specification, and may also include other cipher suites that the provider supports.

Returns:String[]

an array of cipher suite names

Annotations
@Override
setUseEngineSocketback to summary
pack-priv void setUseEngineSocket(boolean useEngineSocket)

Configures the socket to be created for this instance. If not called, useEngineSocketByDefault will be used.

setUseEngineSocketByDefaultback to summary
pack-priv static void setUseEngineSocketByDefault(boolean useEngineSocket)

Configures the default socket type to be created for the default and all new instances.