public final class ConnectionSpecSelector extends Object
Constructor and Description |
---|
ConnectionSpecSelector(List<ConnectionSpec> connectionSpecs) |
Modifier and Type | Method and Description |
---|---|
ConnectionSpec |
configureSecureSocket(SSLSocket sslSocket)
Configures the supplied
SSLSocket to connect to the specified host using an appropriate
ConnectionSpec . |
boolean |
connectionFailed(IOException e)
Reports a failure to complete a connection.
|
public ConnectionSpecSelector(List<ConnectionSpec> connectionSpecs)
public ConnectionSpec configureSecureSocket(SSLSocket sslSocket) throws IOException
SSLSocket
to connect to the specified host using an appropriate
ConnectionSpec
. Returns the chosen ConnectionSpec
, never null
.IOException
- if the socket does not support any of the TLS modes availablepublic boolean connectionFailed(IOException e)
ConnectionSpec
to
try, if any.true
if the connection should be retried using
configureSecureSocket(SSLSocket)
or false
if notCopyright © 2017. All Rights Reserved.