Search in sources :

Example 1 with RequestProducerGetter

use of com.navercorp.pinpoint.plugin.httpclient4.RequestProducerGetter in project pinpoint by naver.

the class DefaultClientExchangeHandlerImplStartMethodInterceptor method getHost.

private NameIntValuePair<String> getHost(final Object target) {
    if (!(target instanceof RequestProducerGetter)) {
        return null;
    }
    final HttpAsyncRequestProducer producer = ((RequestProducerGetter) target)._$PINPOINT$_getRequestProducer();
    final HttpHost httpHost = producer.getTarget();
    if (httpHost != null) {
        return new NameIntValuePair<String>(httpHost.getHostName(), httpHost.getPort());
    } else {
        return null;
    }
}
Also used : NameIntValuePair(com.navercorp.pinpoint.bootstrap.pair.NameIntValuePair) RequestProducerGetter(com.navercorp.pinpoint.plugin.httpclient4.RequestProducerGetter) HttpAsyncRequestProducer(org.apache.http.nio.protocol.HttpAsyncRequestProducer) HttpHost(org.apache.http.HttpHost)

Aggregations

NameIntValuePair (com.navercorp.pinpoint.bootstrap.pair.NameIntValuePair)1 RequestProducerGetter (com.navercorp.pinpoint.plugin.httpclient4.RequestProducerGetter)1 HttpHost (org.apache.http.HttpHost)1 HttpAsyncRequestProducer (org.apache.http.nio.protocol.HttpAsyncRequestProducer)1