com.twistedmatrix.util
Class SSLFactory

java.lang.Object
  |
  +--com.twistedmatrix.util.SSLFactory
All Implemented Interfaces:
StreamPairFactory

public class SSLFactory
extends java.lang.Object
implements StreamPairFactory

A StreamPair factory that uses SSL connections.

All methods in this class are thread-safe.


Constructor Summary
SSLFactory(java.lang.String host, int port, javax.net.ssl.SSLSocketFactory sslfactory)
          Create a factory that will return connections to a specific server.
 
Method Summary
 StreamPair createConnection()
          Create a new connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLFactory

public SSLFactory(java.lang.String host,
                  int port,
                  javax.net.ssl.SSLSocketFactory sslfactory)
Create a factory that will return connections to a specific server.
Parameters:
host - the server's hostname.
port - the server's port.
sslfactory - a factory which creates SSL connections.
Method Detail

createConnection

public StreamPair createConnection()
Create a new connection.
Specified by:
createConnection in interface StreamPairFactory
Following copied from interface: com.twistedmatrix.util.StreamPairFactory
Returns:
a StreamPair or null if a connection could not be gotten.