Package org.apache.synapse.transport.http.conn

## Class ClientConnFactory

- java.lang.Object
- - org.apache.synapse.transport.http.conn.ClientConnFactory

-     public class ClientConnFactory
      extends Object

  This custom client connection factory can keep a map of SSLContexts and use the correct SSLContext when connecting to different servers. If a SSLContext cannot be found for a particular server from the specified map it uses the default SSLContext.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected org.apache.commons.logging.Log` | `log` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClientConnFactory​(org.apache.http.HttpResponseFactory responseFactory, org.apache.http.nio.util.ByteBufferAllocator allocator, SSLContextDetails ssl, Map<RequestDescriptor,​SSLContext> sslByHostMap, org.apache.http.params.HttpParams params)` |
    `ClientConnFactory​(org.apache.http.params.HttpParams params)` |
    `ClientConnFactory​(SSLContextDetails ssl, Map<RequestDescriptor,​SSLContext> sslByHostMap, org.apache.http.params.HttpParams params)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.apache.http.impl.nio.DefaultNHttpClientConnection` | `createConnection​(org.apache.http.nio.reactor.IOSession iosession, org.apache.http.conn.routing.HttpRoute route, String requestID)` |
    `Set<RequestDescriptor>` | `getHostList()` | Returns Set of Host:Port String entries
    `void` | `upgrade​(UpgradableNHttpConnection conn)` |
    `void` | `upgrade​(UpgradableNHttpConnection conn, RouteRequestMapping routeRequestMapping)` |

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

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

- - ### Field Detail

    - #### log

          protected org.apache.commons.logging.Log log

  - ### Constructor Detail

    - #### ClientConnFactory

          public ClientConnFactory​(org.apache.http.HttpResponseFactory responseFactory,
                                   org.apache.http.nio.util.ByteBufferAllocator allocator,
                                   SSLContextDetails ssl,
                                   Map<RequestDescriptor,​SSLContext> sslByHostMap,
                                   org.apache.http.params.HttpParams params)

    - #### ClientConnFactory

          public ClientConnFactory​(SSLContextDetails ssl,
                                   Map<RequestDescriptor,​SSLContext> sslByHostMap,
                                   org.apache.http.params.HttpParams params)

    - #### ClientConnFactory

          public ClientConnFactory​(org.apache.http.params.HttpParams params)

  - ### Method Detail

    - #### createConnection

          public org.apache.http.impl.nio.DefaultNHttpClientConnection createConnection​(org.apache.http.nio.reactor.IOSession iosession,
                                                                                        org.apache.http.conn.routing.HttpRoute route,
                                                                                        String requestID)

    - #### upgrade

          public void upgrade​(UpgradableNHttpConnection conn)

    - #### upgrade

          public void upgrade​(UpgradableNHttpConnection conn,
                              RouteRequestMapping routeRequestMapping)

    - #### getHostList

          public Set<RequestDescriptor> getHostList()

      Returns Set of Host:Port String entries
      Returns:
        String Set