org.apache.synapse.transport.passthru.connections

## Class HostConnections

- java.lang.Object
- - org.apache.synapse.transport.passthru.connections.HostConnections

-     public class HostConnections
      extends java.lang.Object

  This stores connections for a particular host + port.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HostConnections(org.apache.http.conn.routing.HttpRoute route, int maxSize)`
    `HostConnections(org.apache.http.conn.routing.HttpRoute route, int maxSize, ConnectionTimeoutConfiguration connectionTimeoutConfiguration)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConnection(org.apache.http.nio.NHttpClientConnection conn)`
    `boolean` | `canHaveMoreConnections()`
    `void` | `forget(org.apache.http.nio.NHttpClientConnection conn)`
    `org.apache.http.nio.NHttpClientConnection` | `getConnection()` Get a connection for the host:port
    `org.apache.http.conn.routing.HttpRoute` | `getRoute()`
    `void` | `pendingConnectionFailed()` Keep track of the number of times connections to this host:port has failed consecutively
    `void` | `pendingConnectionSucceeded()` Indicates that a connection has been successfully established with a remote server as notified by the session request call back.
    `void` | `release(org.apache.http.nio.NHttpClientConnection conn)`

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

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

- - ### Constructor Detail

    - #### HostConnections

          public HostConnections(org.apache.http.conn.routing.HttpRoute route,
                                 int maxSize)

    - #### HostConnections

          public HostConnections(org.apache.http.conn.routing.HttpRoute route,
                                 int maxSize,
                                 ConnectionTimeoutConfiguration connectionTimeoutConfiguration)

  - ### Method Detail

    - #### getConnection

          public org.apache.http.nio.NHttpClientConnection getConnection()

      Get a connection for the host:port
      Returns:
        a connection

    - #### release

          public void release(org.apache.http.nio.NHttpClientConnection conn)

    - #### forget

          public void forget(org.apache.http.nio.NHttpClientConnection conn)

    - #### addConnection

          public void addConnection(org.apache.http.nio.NHttpClientConnection conn)

    - #### pendingConnectionSucceeded

          public void pendingConnectionSucceeded()

      Indicates that a connection has been successfully established with a remote server as notified by the session request call back.

    - #### pendingConnectionFailed

          public void pendingConnectionFailed()

      Keep track of the number of times connections to this host:port has failed consecutively

    - #### getRoute

          public org.apache.http.conn.routing.HttpRoute getRoute()

    - #### canHaveMoreConnections

          public boolean canHaveMoreConnections()

Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.