-
public final class ConnectionSpecSelectorHandles the connection spec fallback strategy: When a secure socket connection fails due to a handshake / protocol problem the connection may be retried with different protocols. Instances are stateful and should be created and used for a single connection attempt.
-
-
Constructor Summary
Constructors Constructor Description ConnectionSpecSelector(List<ConnectionSpec> connectionSpecs)
-
Method Summary
Modifier and Type Method Description ConnectionSpecconfigureSecureSocket(SSLSocket sslSocket)Configures the supplied SSLSocket to connect to the specified host using an appropriate ConnectionSpec. booleanconnectionFailed(IOException e)Reports a failure to complete a connection. -
-
Constructor Detail
-
ConnectionSpecSelector
ConnectionSpecSelector(List<ConnectionSpec> connectionSpecs)
-
-
Method Detail
-
configureSecureSocket
ConnectionSpec configureSecureSocket(SSLSocket sslSocket)
Configures the supplied SSLSocket to connect to the specified host using an appropriate ConnectionSpec. Returns the chosen ConnectionSpec, never
{@code null}.
-
connectionFailed
boolean connectionFailed(IOException e)
Reports a failure to complete a connection. Determines the next ConnectionSpec to try,if any.
-
-
-
-