@Override public void connect(ManagedHttpClientConnection conn, HttpHost host, InetSocketAddress localAddress, int connectTimeout, SocketConfig socketConfig, HttpContext context) throws IOException { try { super.connect(conn, host, localAddress, connectTimeout, socketConfig, context); } finally { SampleResult sample = (SampleResult)context.getAttribute(HTTPHC4Impl.CONTEXT_ATTRIBUTE_SAMPLER_RESULT); if (sample != null) { sample.connectEnd(); } } } }
private void connect(SampleResult res) { if (channel == null || !channel.isOpen()) { try { channel = (DatagramChannel) getChannel(); } catch (IOException ex) { log.error("Cannot open channel", ex); } } res.connectEnd(); }
sampleResult.connectEnd();
sock = getSocket(socketKey); } finally { res.connectEnd();
conn = DataSourceElement.getConnection(getDataSource()); } finally { res.connectEnd();