@Override
    public String toString() {
        final StringBuilder cab = new StringBuilder(50 + getHopCount() * 30);

        cab.append("RouteTracker[");
        if (this.localAddress != null) {
            cab.append(this.localAddress);
            cab.append("->");
        } else if (this.unixDomainSocket != null) {
            cab.append(this.unixDomainSocket).append("->");
        }
        cab.append('{');
        if (this.connected) {
            cab.append('c');
        }
        if (this.tunnelled == TunnelType.TUNNELLED) {
            cab.append('t');
        }
        if (this.layered == LayerType.LAYERED) {
            cab.append('l');
        }
        if (this.secure) {
            cab.append('s');
        }
        cab.append("}->");
        if (this.proxyChain != null) {
            for (final HttpHost element : this.proxyChain) {
                cab.append(element);
                cab.append("->");
            }
        }
        cab.append(this.targetHost);
        cab.append(']');

        return cab.toString();
    }
Obtains a description of the tracked route.

@return  a human-readable representation of the tracked route
httpclient5/src/main/java/org/apache/hc/client5/http/RouteTracker.java