com.endeca.navigation
Class StaticKeyStoreSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by javax.net.ssl.SSLSocketFactory
          extended by com.endeca.navigation.StaticKeyStoreSocketFactory

public abstract class StaticKeyStoreSocketFactory
extends SSLSocketFactory

A SocketFactory implementation that takes a KeyStore to be used for SSL connections in place of any environment or JVM-specific class. When a new connection is created using the StaticKeyStoreSocketFactory, the public and private keys found in the KeyStore that is set through the setKeyStore method will be used for setting up the connection.


Constructor Summary
StaticKeyStoreSocketFactory()
           
 
Method Summary
static SocketFactory getDefault()
          Returns a SocketFactory that is configured to use SSL with the KeyStore provided through the setKeyStore method.
static void setKeyStore(KeyStore ks, char[] passphrase)
          Sets the keystore information to use when using client certificates with SSL.
static void setKeyStore(KeyStore ks, String passphrase)
          Sets the keystore information to use when using client certificates with SSL.
 
Methods inherited from class javax.net.ssl.SSLSocketFactory
createSocket, getDefaultCipherSuites, getSupportedCipherSuites
 
Methods inherited from class javax.net.SocketFactory
createSocket, createSocket, createSocket, createSocket, createSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticKeyStoreSocketFactory

public StaticKeyStoreSocketFactory()
Method Detail

setKeyStore

public static void setKeyStore(KeyStore ks,
                               String passphrase)
Sets the keystore information to use when using client certificates with SSL. The keystore type is implied to be "JKS".

Parameters:
ks - the keystore containing the client certificates.
passphrase - a string that is the password for the keystore.

setKeyStore

public static void setKeyStore(KeyStore ks,
                               char[] passphrase)
Sets the keystore information to use when using client certificates with SSL. The keystore type is implied to be "JKS".

Parameters:
ks - the keystore containing the client certificates.
passphrase - a char array containing the password for the keystore.

getDefault

public static SocketFactory getDefault()
Returns a SocketFactory that is configured to use SSL with the KeyStore provided through the setKeyStore method.

Returns:
A SocketFactory object.


2010 Endeca Technologies, Inc.
Endeca Confidential