org.objectweb.cjdbc.common.net
Class SocketFactoryFactory

java.lang.Object
  extended byorg.objectweb.cjdbc.common.net.SocketFactoryFactory

public class SocketFactoryFactory
extends java.lang.Object

This class defines a SocketFactory

Version:
1.0
Author:
Marc Wick

Constructor Summary
SocketFactoryFactory()
           
 
Method Summary
static javax.net.SocketFactory createFactory(SSLConfiguration config)
          create a socket factory with the specified configuration
static javax.net.ServerSocketFactory createServerFactory(SSLConfiguration config)
          create a server socket factory with the specified configuration
static com.sun.net.ssl.SSLContext createSSLContext(SSLConfiguration config)
          create a ssl context
protected static com.sun.net.ssl.KeyManager[] getKeyManagers(java.io.File keyStore, java.lang.String keyStorePassword, java.lang.String keyPassword)
           
protected static com.sun.net.ssl.TrustManager[] getTrustManagers(java.io.File trustStore, java.lang.String trustStorePassword)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketFactoryFactory

public SocketFactoryFactory()
Method Detail

createServerFactory

public static javax.net.ServerSocketFactory createServerFactory(SSLConfiguration config)
                                                         throws SSLException
create a server socket factory with the specified configuration

Parameters:
config - - the ssl configuration
Returns:
- the socket factory
Throws:
SSLException - - could not create factory

createFactory

public static javax.net.SocketFactory createFactory(SSLConfiguration config)
                                             throws java.lang.Exception
create a socket factory with the specified configuration

Parameters:
config - - the ssl configuration
Returns:
- the socket factory
Throws:
java.lang.Exception - - could not create factory

createSSLContext

public static com.sun.net.ssl.SSLContext createSSLContext(SSLConfiguration config)
                                                   throws java.lang.Exception
create a ssl context

Parameters:
config - - ssl config
Returns:
- the ssl context
Throws:
java.lang.Exception - - problems initializing the content

getKeyManagers

protected static com.sun.net.ssl.KeyManager[] getKeyManagers(java.io.File keyStore,
                                                             java.lang.String keyStorePassword,
                                                             java.lang.String keyPassword)
                                                      throws java.io.IOException,
                                                             java.security.GeneralSecurityException
Throws:
java.io.IOException
java.security.GeneralSecurityException

getTrustManagers

protected static com.sun.net.ssl.TrustManager[] getTrustManagers(java.io.File trustStore,
                                                                 java.lang.String trustStorePassword)
                                                          throws java.io.IOException,
                                                                 java.security.GeneralSecurityException
Throws:
java.io.IOException
java.security.GeneralSecurityException


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.