Package org.apache.synapse.transport.passthru.connections

# Class HostConnections

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

public class HostConnections extends Object
This stores connections for a particular host + port.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HostConnections(RouteRequestMapping route, int maxSize)`
  `HostConnections(RouteRequestMapping route, int maxSize, ConnectionTimeoutConfiguration connectionTimeoutConfiguration)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addConnection(org.apache.http.nio.NHttpClientConnection conn)`
  `boolean`
  `checkAndIncrementPendingConnections()`
  `void`
  `forget(org.apache.http.nio.NHttpClientConnection conn)`
  `org.apache.http.nio.NHttpClientConnection`
  `getConnection()`
  Get a connection for the host:port
  `RouteRequestMapping`
  `getRouteRequestMapping()`
  `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 Details

  - ### HostConnections

    public HostConnections(RouteRequestMapping route, int maxSize)

  - ### HostConnections

    public HostConnections(RouteRequestMapping route, int maxSize, ConnectionTimeoutConfiguration connectionTimeoutConfiguration)

- ## Method Details

  - ### 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

  - ### getRouteRequestMapping

    public RouteRequestMapping getRouteRequestMapping()

  - ### checkAndIncrementPendingConnections

    public boolean checkAndIncrementPendingConnections()