com.netflix.niws.client
Class URLSslContextFactory

java.lang.Object
  extended by com.netflix.niws.cert.AbstractSslContextFactory
      extended by com.netflix.niws.client.URLSslContextFactory

public class URLSslContextFactory
extends AbstractSslContextFactory

Secure socket factory that is used the NIWS code if a non-standard key store or trust store is specified.


Field Summary
 
Fields inherited from class com.netflix.niws.cert.AbstractSslContextFactory
SOCKET_ALGORITHM
 
Constructor Summary
URLSslContextFactory(java.net.URL trustStoreUrl, java.lang.String trustStorePassword, java.net.URL keyStoreUrl, java.lang.String keyStorePassword)
          Creates a ClientSSLSocketFactory instance.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class com.netflix.niws.cert.AbstractSslContextFactory
getKeyStore, getKeyStorePasswordLength, getSSLContext, getTrustStore, getTrustStorePasswordLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLSslContextFactory

public URLSslContextFactory(java.net.URL trustStoreUrl,
                            java.lang.String trustStorePassword,
                            java.net.URL keyStoreUrl,
                            java.lang.String keyStorePassword)
                     throws ClientSslSocketFactoryException
Creates a ClientSSLSocketFactory instance. This instance loads only the given trust store file and key store file. Both trust store and key store must be protected by passwords, even though it is not mandated by JSSE.

Parameters:
trustStoreUrl - A URL that points to a trust store file. If non-null, this URL must refer to a JKS key store file that contains trusted certificates.
trustStorePassword - The password of the given trust store file. If a trust store is specified, then the password may not be empty.
keyStoreUrl - A URL that points to a key store file that contains both client certificate and the client's private key. If non-null, this URL must be of JKS format.
keyStorePassword - the password of the given key store file. If a key store is specified, then the password may not be empty.
Throws:
ClientSslSocketFactoryException - thrown if creating this instance fails.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object