}
public void connected(NHttpClientConnection conn, Object o) {
assert o instanceof HostConnections : "Attachment should be a HostConnections";
HostConnections pool = (HostConnections) o;
conn.getContext().setAttribute(RelayConstants.CONNECTION_POOL, pool);
// create the connection information and set it to request ready
TargetContext.create(conn, ProtocolState.REQUEST_READY, targetConfiguration);
// notify the pool about the new connection
targetConfiguration.getConnections().addConnection(conn);
// notify about the new connection
deliveryAgent.connected(pool.getHost(), pool.getPort());
metrics.connected();
}