From be00ce1ef1873d3b80830966ddb83097e460601d Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:29:14 +0000 Subject: [PATCH] feat: add isShutdown in HttpTransport (#1901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add isShutdown in HttpTransport * fix lint * add comment * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * refactor according to code review * restore comment changes * change year * change default implementation --------- Co-authored-by: Owl Bot --- .../com/google/api/client/http/HttpTransport.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java index d70d7fb5f..9a2d04220 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java @@ -21,7 +21,7 @@ /** * Thread-safe abstract HTTP transport. * - *

Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

Implementation is thread-safe, and subclasses must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the HTTP transport. * *

The recommended concrete implementation HTTP transport library to use depends on what @@ -158,4 +158,14 @@ public boolean isMtls() { * @since 1.4 */ public void shutdown() throws IOException {} + + /** + * Returns whether the transport is shutdown or not. + * + * @return true if the transport is shutdown. + * @since 1.44.0 + */ + public boolean isShutdown() { + return true; + } }