public static SSLContext getInstance(String protocol)
            throws NoSuchAlgorithmException {
        GetInstance.Instance instance = GetInstance.getInstance
                ("SSLContext", SSLContextSpi.class, protocol);
        return new SSLContext((SSLContextSpi)instance.impl, instance.provider,
                protocol);
    }
public static SSLContext getInstance ( String protocol ) throws NoSuchAlgorithmException { GetInstance . Instance instance = GetInstance . getInstance ( "SSLContext" , SSLContextSpi . class , protocol ) ; return new SSLContext ( ( SSLContextSpi ) instance . impl , instance . provider , protocol ) ; }
Returns a <code>SSLContext</code> object that implements the
specified secure socket protocol.

<p> This method traverses the list of registered security Providers,
starting with the most preferred Provider.
A new SSLContext object encapsulating the
SSLContextSpi implementation from the first
Provider that supports the specified protocol is returned.

<p> Note that the list of registered providers may be retrieved via
the {@link Security#getProviders() Security.getProviders()} method.

@param protocol the standard name of the requested protocol.
See the SSLContext section in the <a href=
"{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#SSLContext">
Java Cryptography Architecture Standard Algorithm Name
Documentation</a>
for information about standard protocol names.

@return the new <code>SSLContext</code> object.

@exception NoSuchAlgorithmException if no Provider supports a
TrustManagerFactorySpi implementation for the
specified protocol.
@exception NullPointerException if protocol is null.

@see java.security.Provider