YvCeung commented on code in PR #7586:
URL: https://github.com/apache/incubator-seata/pull/7586#discussion_r2375334407
##########
common/src/main/java/org/apache/seata/common/util/Http2ClientUtil.java:
##########
@@ -35,9 +35,9 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;
-public class Http5ClientUtil {
+public class Http2ClientUtil {
Review Comment:
However, recently I have been thinking about one point: whether the http2
function is supported or not not only depends on the business system's reliance
on jar packages, but also on whether the `TC` end supports the http2 protocol.
Currently, I'm considering whether the judgment logic for the latter can be
directly placed in the `getClient` method of `HttpClientFactory ` for judgment.
If so, such an implementation would be more elegant. This is what I now solve
this issue (https://github.com/apache/incubator-seata/issues/7561)
##########
common/src/main/java/org/apache/seata/common/util/Http2ClientUtil.java:
##########
@@ -35,9 +35,9 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;
-public class Http5ClientUtil {
+public class Http2ClientUtil {
Review Comment:
I think a factory class can be provided, for example, called
`HttpClientFactory`, to obtain the specific client instance through the
`getClient` method: For instance, if it is detected that http2 is available in
the business system, use Http2ClientUtil; otherwise, use the original
HttpClientUtil. However, this requires unifying the current apis of these two
tool classes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]