private static SessionProtocol getSessionProtocol(URI uri) {
        final String schemeStr = uri.getScheme();
        if (schemeStr != null && schemeStr.indexOf('+') < 0) {
            final SessionProtocol parsed = SessionProtocol.find(schemeStr);
            if (parsed == null) {
                throw newInvalidSchemeException(uri);
            }
            return parsed;
        } else {
            final Scheme parsed = Scheme.tryParse(schemeStr);
            if (parsed == null) {
                throw newInvalidSchemeException(uri);
            }
            return parsed.sessionProtocol();
        }
    }
Creates a new builder with the specified {@link RpcRequest} and {@link URI}.

@param server whether this builder will build a server-side context.
@param rpcReq the {@link RpcRequest}.
@param uri the {@link URI} of the request endpoint.
core/src/main/java/com/linecorp/armeria/common/AbstractRequestContextBuilder.java