类 HttpServiceProxyFactory

java.lang.Object
cn.taketoday.web.service.invoker.HttpServiceProxyFactory

public final class HttpServiceProxyFactory extends Object
Factory to create a client proxy from an HTTP service interface with @HttpExchange methods.

To create an instance, use static methods to obtain a Builder.

从以下版本开始:
4.0
作者:
Rossen Stoyanchev, Harry Yang
另请参阅:
  • 字段详细资料

    • exchangeAdapter

      private final HttpExchangeAdapter exchangeAdapter
    • argumentResolvers

      private final List<HttpServiceArgumentResolver> argumentResolvers
    • embeddedValueResolver

      @Nullable private final cn.taketoday.core.StringValueResolver embeddedValueResolver
  • 构造器详细资料

  • 方法详细资料

    • createClient

      public <S> S createClient(Class<S> serviceType)
      Return a proxy that implements the given HTTP service interface to perform HTTP requests and retrieve responses through an HTTP client.
      类型参数:
      S - the HTTP service type
      参数:
      serviceType - the HTTP service to create a proxy for
      返回:
      the created proxy
    • isExchangeMethod

      private boolean isExchangeMethod(Method method)
    • createHttpServiceMethod

      private <S> HttpServiceMethod createHttpServiceMethod(Class<S> serviceType, Method method)
    • forAdapter

      public static HttpServiceProxyFactory.Builder forAdapter(HttpExchangeAdapter exchangeAdapter)
      Return a builder that's initialized with the given client.
    • builder

      public static HttpServiceProxyFactory.Builder builder()
      Return an empty builder, with the client to be provided to builder.