code: public static HttpCarbonRequest setupCarbonRequest(HttpRequest httpRequest, Http2SourceHandler http2SourceHandler) {
          ChannelHandlerContext ctx = http2SourceHandler.getChannelHandlerContext();
          HttpCarbonRequest sourceReqCMsg = new HttpCarbonRequest(httpRequest, new DefaultListener(ctx));
          sourceReqCMsg.setProperty(POOLED_BYTE_BUFFER_FACTORY, new PooledDataStreamerFactory(ctx.alloc()));
          sourceReqCMsg.setProperty(CHNL_HNDLR_CTX, ctx);
          sourceReqCMsg.setProperty(Constants.SRC_HANDLER, http2SourceHandler);
          HttpVersion protocolVersion = httpRequest.protocolVersion();
          sourceReqCMsg.setProperty(HTTP_VERSION, protocolVersion.majorVersion() + "." + protocolVersion.minorVersion());
          sourceReqCMsg.setProperty(HTTP_METHOD, httpRequest.method().name());
  
          InetSocketAddress localAddress = null;
          //This check was added because in case of netty embedded channel, this could be of type 'EmbeddedSocketAddress'.
          if (ctx.channel().localAddress() instanceof InetSocketAddress) {
              localAddress = (InetSocketAddress) ctx.channel().localAddress();
          }
          sourceReqCMsg.setProperty(LOCAL_ADDRESS, localAddress);
          sourceReqCMsg.setProperty(LISTENER_PORT, localAddress != null ? localAddress.getPort() : null);
          sourceReqCMsg.setProperty(LISTENER_INTERFACE_ID, http2SourceHandler.getInterfaceId());
          sourceReqCMsg.setProperty(PROTOCOL, HTTP_SCHEME);
          String uri = httpRequest.uri();
          sourceReqCMsg.setProperty(REQUEST_URL, uri);
          sourceReqCMsg.setProperty(TO, uri);
          return sourceReqCMsg;
      }
docs: Creates a {@code HttpCarbonRequest} from HttpRequest.
  
  @param httpRequest        the HTTPRequest message
  @param http2SourceHandler the HTTP/2 source handler
  @return the CarbonRequest Message created from given HttpRequest