com.twistedmatrix.util
Class TCPFactory

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

public class TCPFactory
extends java.lang.Object
implements StreamPairFactory

A StreamPair factory that uses unencrypted TCP connections.

All methods in this class are thread-safe.


Constructor Summary
TCPFactory(java.lang.String host, int port)
          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

TCPFactory

public TCPFactory(java.lang.String host,
                  int port)
Create a factory that will return connections to a specific server.
Parameters:
host - the server's hostname.
port - the server's port.
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.