use of org.apache.http.conn.OperatedClientConnection in project jmeter by apache.
the class ManagedClientConnectionImpl method tunnelProxy.
@Override
public void tunnelProxy(final HttpHost next, final boolean secure, final HttpParams params) throws IOException {
Args.notNull(next, "Next proxy");
Args.notNull(params, "HTTP parameters");
final OperatedClientConnection conn;
synchronized (this) {
if (this.poolEntry == null) {
throw new ConnectionShutdownException();
}
final RouteTracker tracker = this.poolEntry.getTracker();
Asserts.notNull(tracker, "Route tracker");
Asserts.check(tracker.isConnected(), "Connection not open");
conn = this.poolEntry.getConnection();
}
conn.update(null, next, secure, params);
synchronized (this) {
if (this.poolEntry == null) {
throw new InterruptedIOException();
}
final RouteTracker tracker = this.poolEntry.getTracker();
tracker.tunnelProxy(next, secure);
}
}
use of org.apache.http.conn.OperatedClientConnection in project jmeter by apache.
the class ManagedClientConnectionImpl method setSocketTimeout.
@Override
public void setSocketTimeout(final int timeout) {
final OperatedClientConnection conn = ensureConnection();
conn.setSocketTimeout(timeout);
}
use of org.apache.http.conn.OperatedClientConnection in project jmeter by apache.
the class ManagedClientConnectionImpl method getSSLSession.
@Override
public SSLSession getSSLSession() {
final OperatedClientConnection conn = ensureConnection();
SSLSession result = null;
final Socket sock = conn.getSocket();
if (sock instanceof SSLSocket) {
result = ((SSLSocket) sock).getSession();
}
return result;
}
use of org.apache.http.conn.OperatedClientConnection in project jmeter by apache.
the class ManagedClientConnectionImpl method sendRequestEntity.
@Override
public void sendRequestEntity(final HttpEntityEnclosingRequest request) throws HttpException, IOException {
final OperatedClientConnection conn = ensureConnection();
conn.sendRequestEntity(request);
}
use of org.apache.http.conn.OperatedClientConnection in project jmeter by apache.
the class ManagedClientConnectionImpl method layerProtocol.
@Override
public void layerProtocol(final HttpContext context, final HttpParams params) throws IOException {
Args.notNull(params, "HTTP parameters");
final HttpHost target;
final OperatedClientConnection conn;
synchronized (this) {
if (this.poolEntry == null) {
throw new ConnectionShutdownException();
}
final RouteTracker tracker = this.poolEntry.getTracker();
Asserts.notNull(tracker, "Route tracker");
Asserts.check(tracker.isConnected(), "Connection not open");
Asserts.check(tracker.isTunnelled(), "Protocol layering without a tunnel not supported");
Asserts.check(!tracker.isLayered(), "Multiple protocol layering not supported");
target = tracker.getTargetHost();
conn = this.poolEntry.getConnection();
}
this.operator.updateSecureConnection(conn, target, context, params);
synchronized (this) {
if (this.poolEntry == null) {
throw new InterruptedIOException();
}
final RouteTracker tracker = this.poolEntry.getTracker();
tracker.layerProtocol(conn.isSecure());
}
}
Aggregations