public class TLSServerSocketFactory extends AbstractTLSSocketFactory implements org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory
<factory name="secure"
class="org.apache.avalon.cornerstone.blocks.sockets.TLSServerSocketFactory" >
<ssl-factory /> <!-- see SSLFactoryBuilder -->
<timeout> 0 </timeout>
<!-- With this option set to a non-zero timeout, a call to
accept() for this ServerSocket will block for only this amount of
time. If the timeout expires, a java.io.InterruptedIOException is
raised, though the ServerSocket is still valid. Default value is 0. -->
<authenticate-client>false</authenticate-client>
<!-- Whether or not the client must present a certificate to
confirm its identity. Defaults to false. -->
</factory>
| Modifier and Type | Field and Description |
|---|---|
private javax.net.ssl.SSLServerSocketFactory |
m_factory |
protected boolean |
m_keyStoreAuthenticateClients |
m_socketTimeOut| Constructor and Description |
|---|
TLSServerSocketFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Configures the factory.
|
java.net.ServerSocket |
createServerSocket(int port)
Creates a socket on specified port.
|
java.net.ServerSocket |
createServerSocket(int port,
int backLog)
Creates a socket on specified port with a specified backLog.
|
java.net.ServerSocket |
createServerSocket(int port,
int backLog,
java.net.InetAddress bindAddress)
Creates a socket on a particular network interface on specified port
with a specified backLog.
|
protected void |
initServerSocket(java.net.ServerSocket serverSocket) |
protected void |
visitBuilder(SSLFactoryBuilder builder)
The child factories have to use an instance of
SSLFactoryBuilder to obtain their factories.
|
contextualize, initializeprivate javax.net.ssl.SSLServerSocketFactory m_factory
protected boolean m_keyStoreAuthenticateClients
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractTLSSocketFactoryconfiguration - the Configurationorg.apache.avalon.framework.configuration.ConfigurationException - if an error occursprotected void visitBuilder(SSLFactoryBuilder builder)
AbstractTLSSocketFactoryvisitBuilder in class AbstractTLSSocketFactorypublic java.net.ServerSocket createServerSocket(int port)
throws java.io.IOException
createServerSocket in interface org.apache.avalon.cornerstone.services.sockets.ServerSocketFactoryport - the portjava.io.IOException - if an error occurspublic java.net.ServerSocket createServerSocket(int port,
int backLog)
throws java.io.IOException
createServerSocket in interface org.apache.avalon.cornerstone.services.sockets.ServerSocketFactoryport - the portbackLog - the backLogjava.io.IOException - if an error occurspublic java.net.ServerSocket createServerSocket(int port,
int backLog,
java.net.InetAddress bindAddress)
throws java.io.IOException
createServerSocket in interface org.apache.avalon.cornerstone.services.sockets.ServerSocketFactoryport - the portbackLog - the backLogbindAddress - the network interface to bind to.java.io.IOException - if an error occursprotected void initServerSocket(java.net.ServerSocket serverSocket)
throws java.io.IOException
java.io.IOException