/** * Closes the transport level conduit in the client. Reopening a new connection, requires creating * a new client object using the build() method in this builder. * * @param root The resource returned by the build() method of this builder class */ public static void closeClient(ApiRootResource root) { ClientConfiguration config = WebClient.getConfig(root); HTTPConduit conduit = config.getHttpConduit(); if (conduit == null) { throw new IllegalArgumentException("Client is not using the HTTP transport"); } conduit.close(); }