org.apache.cassandra.streaming

## Class DefaultConnectionFactory

- java.lang.Object
- - org.apache.cassandra.streaming.DefaultConnectionFactory

All Implemented Interfaces:
  StreamConnectionFactory

    public class DefaultConnectionFactory
    extends java.lang.Object
    implements StreamConnectionFactory

### Constructor Summary

Constructors
Constructor and Description
`DefaultConnectionFactory()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.net.Socket` `createConnection(java.net.InetAddress peer)` Connect to peer and start exchanging message.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultConnectionFactory

    public DefaultConnectionFactory()

### Method Detail

#### createConnection

    public java.net.Socket createConnection(java.net.InetAddress peer)
                                     throws java.io.IOException

Connect to peer and start exchanging message. When connect attempt fails, this retries for maximum of MAX_CONNECT_ATTEMPTS times.

Specified by:
  `createConnection` in interface `StreamConnectionFactory`
Parameters:
  `peer` - the peer to connect to.
Returns:
  the created socket.
Throws:
  `java.io.IOException` - when connection failed.