Class HostConnections
java.lang.Object
org.apache.synapse.transport.passthru.connections.HostConnections
This stores connections for a particular host + port.
-
Constructor Summary
ConstructorsConstructorDescriptionHostConnections(RouteRequestMapping route, int maxSize) HostConnections(RouteRequestMapping route, int maxSize, ConnectionTimeoutConfiguration connectionTimeoutConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnection(org.apache.http.nio.NHttpClientConnection conn) booleanvoidforget(org.apache.http.nio.NHttpClientConnection conn) org.apache.http.nio.NHttpClientConnectionGet a connection for the host:portvoidKeep track of the number of times connections to this host:port has failed consecutivelyvoidIndicates that a connection has been successfully established with a remote server as notified by the session request call back.voidrelease(org.apache.http.nio.NHttpClientConnection conn)
-
Constructor Details
-
HostConnections
-
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
-
checkAndIncrementPendingConnections
public boolean checkAndIncrementPendingConnections()
-