org.apache.avalon.cornerstone.blocks.sockets
Class AbstractTLSSocketFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.cornerstone.blocks.sockets.AbstractTLSSocketFactory
- All Implemented Interfaces:
- Configurable, Contextualizable, Initializable, LogEnabled
- Direct Known Subclasses:
- TLSServerSocketFactory, TLSSocketFactory
- public abstract class AbstractTLSSocketFactory
- extends AbstractLogEnabled
- implements Contextualizable, Configurable, Initializable
Contains the code common for both TLS socket factories. They both
need to use an SSLFactoryBuilder which is configured using
configuration and context given by the container. Then, they both
set timeouts on the manufactured sockets.
- Author:
- Greg Steuck
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_socketTimeOut
protected int m_socketTimeOut
AbstractTLSSocketFactory
public AbstractTLSSocketFactory()
contextualize
public void contextualize(Context context)
- Specified by:
contextualize
in interface Contextualizable
configure
public void configure(Configuration configuration)
throws ConfigurationException
- Configures the factory.
- Specified by:
configure
in interface Configurable
- Parameters:
configuration
- the Configuration
- Throws:
ConfigurationException
- if an error occurs
initialize
public void initialize()
throws Exception
- Creates an SSL factory using the confuration values.
- Specified by:
initialize
in interface Initializable
- Throws:
Exception
visitBuilder
protected abstract void visitBuilder(SSLFactoryBuilder builder)
- The child factories have to use an instance of
SSLFactoryBuilder to obtain their factories. So they
are given an instance when it's ready. Another alternative was
to have the SSLFactoryBuilder export buildContext method, but
that would mean SSLContext which is deep in Sun guts will be
aired in 3-4 classes instead of 1.
Copyright © Apache Software Foundation. All Rights Reserved.