edu.vt.middleware.ldap.ssl
Class TLSSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by javax.net.ssl.SSLSocketFactory
          extended by edu.vt.middleware.ldap.ssl.AbstractTLSSocketFactory
              extended by edu.vt.middleware.ldap.ssl.TLSSocketFactory
Direct Known Subclasses:
SingletonTLSSocketFactory

public class TLSSocketFactory
extends AbstractTLSSocketFactory

TLSSocketFactory is an extension of SSLSocketFactory. Note that initialize() must be called prior to using this socket factory. This means that this class cannot be passed to implementations that expect the socket factory to function immediately after construction.

Version:
$Revision: 1106 $ $Date: 2010-01-29 23:34:13 -0500 (Fri, 29 Jan 2010) $
Author:
Middleware Services

Field Summary
protected  SSLContextInitializer contextInitializer
          SSLContextInitializer used for initializing SSL contexts.
 
Fields inherited from class edu.vt.middleware.ldap.ssl.AbstractTLSSocketFactory
cipherSuites, DEFAULT_PROTOCOL, factory, protocols
 
Constructor Summary
TLSSocketFactory()
           
 
Method Summary
static SocketFactory getDefault()
          This returns the default SSL socket factory.
 SSLContextInitializer getSSLContextInitializer()
          Returns the SSL context initializer.
 void initialize()
          Creates the underlying SSLContext using truststore and keystore attributes and makes this factory ready for use.
 void setSSLContextInitializer(SSLContextInitializer initializer)
          Sets the SSL context initializer.
 String toString()
          Provides a descriptive string representation of this instance.
 
Methods inherited from class edu.vt.middleware.ldap.ssl.AbstractTLSSocketFactory
createSocket, createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getEnabledCipherSuites, getEnabledProtocols, getFactory, getSupportedCipherSuites, initSSLSocket, setEnabledCipherSuites, setEnabledProtocols
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contextInitializer

protected SSLContextInitializer contextInitializer
SSLContextInitializer used for initializing SSL contexts.

Constructor Detail

TLSSocketFactory

public TLSSocketFactory()
Method Detail

getSSLContextInitializer

public SSLContextInitializer getSSLContextInitializer()
Returns the SSL context initializer.

Returns:
SSLContextInitializer

setSSLContextInitializer

public void setSSLContextInitializer(SSLContextInitializer initializer)
Sets the SSL context initializer.

Parameters:
initializer - to create SSL contexts with

initialize

public void initialize()
                throws GeneralSecurityException
Creates the underlying SSLContext using truststore and keystore attributes and makes this factory ready for use. Must be called before factory can be used.

Specified by:
initialize in class AbstractTLSSocketFactory
Throws:
GeneralSecurityException - if the SSLContext cannot be created

getDefault

public static SocketFactory getDefault()
This returns the default SSL socket factory.

Returns:
SocketFactory

toString

public String toString()
Provides a descriptive string representation of this instance.

Overrides:
toString in class Object
Returns:
String of the form $Classname::factory=$factory.


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.