类 HttpClientBeanHolder

java.lang.Object
com.alibaba.nacos.common.http.HttpClientBeanHolder

public final class HttpClientBeanHolder extends Object
Create a rest template to ensure that each custom client config and rest template are in one-to-one correspondence.
作者:
mai.jh
  • 构造器详细资料

    • HttpClientBeanHolder

      public HttpClientBeanHolder()
  • 方法详细资料

    • getNacosRestTemplate

      public static NacosRestTemplate getNacosRestTemplate(org.slf4j.Logger logger)
    • getNacosRestTemplate

      public static NacosRestTemplate getNacosRestTemplate(HttpClientFactory httpClientFactory)
    • getNacosAsyncRestTemplate

      public static NacosAsyncRestTemplate getNacosAsyncRestTemplate(org.slf4j.Logger logger)
    • getNacosAsyncRestTemplate

      public static NacosAsyncRestTemplate getNacosAsyncRestTemplate(HttpClientFactory httpClientFactory)
    • shutdown

      public static void shutdown(String className) throws Exception
      Shutdown http client holder and close remove template.
      参数:
      className - HttpClientFactory implement class name
      抛出:
      Exception - ex
    • shutdownNacostSyncRest

      public static void shutdownNacostSyncRest(String className) throws Exception
      Shutdown sync http client holder and remove template.
      参数:
      className - HttpClientFactory implement class name
      抛出:
      Exception - ex
    • shutdownNacosAsyncRest

      public static void shutdownNacosAsyncRest(String className) throws Exception
      Shutdown async http client holder and remove template.
      参数:
      className - HttpClientFactory implement class name
      抛出:
      Exception - ex