public void layerProtocol(final boolean secure) {
        // it is possible to layer a protocol over a direct connection,
        // although this case is probably not considered elsewhere
        Asserts.check(this.connected, "No layered protocol unless connected");
        this.layered = LayerType.LAYERED;
        this.secure = secure;
    }
Tracks layering a protocol.

@param secure    {@code true} if the route is secure,
                 {@code false} otherwise
httpclient5/src/main/java/org/apache/hc/client5/http/RouteTracker.java