• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java MethodHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中feign.InvocationHandlerFactory.MethodHandler的典型用法代码示例。如果您正苦于以下问题:Java MethodHandler类的具体用法?Java MethodHandler怎么用?Java MethodHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MethodHandler类属于feign.InvocationHandlerFactory包,在下文中一共展示了MethodHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: apply

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
public Map<String, MethodHandler> apply(Target key) {
  List<MethodMetadata> metadata = contract.parseAndValidatateMetadata(key.type());
  Map<String, MethodHandler> result = new LinkedHashMap<String, MethodHandler>();
  for (MethodMetadata md : metadata) {
    BuildTemplateByResolvingArgs buildTemplate;
    if (!md.formParams().isEmpty() && md.template().bodyTemplate() == null) {
      buildTemplate = new BuildFormEncodedTemplateFromArgs(md, encoder);
    } else if (md.bodyIndex() != null) {
      buildTemplate = new BuildEncodedTemplateFromArgs(md, encoder);
    } else {
      buildTemplate = new BuildTemplateByResolvingArgs(md);
    }
    result.put(md.configKey(),
               factory.create(key, md, buildTemplate, options, decoder, errorDecoder));
  }
  return result;
}
 
开发者ID:wenwu315,项目名称:XXXX,代码行数:18,代码来源:ReflectiveFeign.java


示例2: create

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
MethodHandler create(
    final Target<?> target,
    final MethodMetadata metadata,
    final RequestTemplate.Factory buildTemplateFromArgs,
    final HttpClientOptions options,
    final Decoder decoder,
    final ErrorDecoder errorDecoder) {
  return new AsynchronousMethodHandler(
      target,
      client,
      retryer,
      requestInterceptors,
      logger,
      logLevel,
      metadata,
      buildTemplateFromArgs,
      options,
      decoder,
      errorDecoder,
      decode404);
}
 
开发者ID:OpenFeign,项目名称:feign-vertx,代码行数:22,代码来源:AsynchronousMethodHandler.java


示例3: apply

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
Map<String, MethodHandler> apply(final Target key) {
  final List<MethodMetadata> metadata = contract
      .parseAndValidatateMetadata(key.type());
  final Map<String, MethodHandler> result = new LinkedHashMap<>();

  for (final MethodMetadata md : metadata) {
    BuildTemplateByResolvingArgs buildTemplate;

    if (!md.formParams().isEmpty()
        && md.template().bodyTemplate() == null) {
      buildTemplate = new BuildTemplateByResolvingArgs
          .BuildFormEncodedTemplateFromArgs(md, encoder);
    } else if (md.bodyIndex() != null) {
      buildTemplate = new BuildTemplateByResolvingArgs
          .BuildEncodedTemplateFromArgs(md, encoder);
    } else {
      buildTemplate = new BuildTemplateByResolvingArgs(md);
    }

    result.put(md.configKey(), factory.create(
            key, md, buildTemplate, options, decoder, errorDecoder));
  }

  return result;
}
 
开发者ID:OpenFeign,项目名称:feign-vertx,代码行数:26,代码来源:VertxFeign.java


示例4: HystrixInvocationHandler

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
HystrixInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch,
                         SetterFactory setterFactory, FallbackFactory<?> fallbackFactory) {
  this.target = checkNotNull(target, "target");
  this.dispatch = checkNotNull(dispatch, "dispatch");
  this.fallbackFactory = fallbackFactory;
  this.fallbackMethodMap = toFallbackMethod(dispatch);
  this.setterMethodMap = toSetters(setterFactory, target, dispatch.keySet());
}
 
开发者ID:wenwu315,项目名称:XXXX,代码行数:9,代码来源:HystrixInvocationHandler.java


示例5: create

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
public MethodHandler create(Target<?> target, MethodMetadata md,
                            RequestTemplate.Factory buildTemplateFromArgs,
                            Options options, Decoder decoder, ErrorDecoder errorDecoder) {
  return new SynchronousMethodHandler(target, client, retryer, requestInterceptors, logger,
                                      logLevel, md, buildTemplateFromArgs, options, decoder,
                                      errorDecoder, decode404);
}
 
开发者ID:wenwu315,项目名称:XXXX,代码行数:8,代码来源:SynchronousMethodHandler.java


示例6: CompletableInvocationHandler

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
CompletableInvocationHandler(final Target<?> target, final Map<Method, MethodHandler> dispatch,
    final FutureMethodCallFactory futureFactory, final Executor executor) {
  this.target = target;
  this.dispatch = dispatch;
  this.futureFactory = futureFactory;
  this.executor = executor;
}
 
开发者ID:client-side,项目名称:completable-feign,代码行数:8,代码来源:CompletableInvocationHandler.java


示例7: EnhanceInvocationHandler

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
public EnhanceInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch,
                         SetterFactory setterFactory, FallbackFactory<?> fallbackFactory) {
  this.target = checkNotNull(target, "target");
  this.dispatch = checkNotNull(dispatch, "dispatch");
  this.fallbackFactory = fallbackFactory;
  this.fallbackMethodMap = toFallbackMethod(dispatch);
  this.setterMethodMap = toSetters(setterFactory, target, dispatch.keySet());
}
 
开发者ID:wayshall,项目名称:onetwo,代码行数:9,代码来源:EnhanceInvocationHandler.java


示例8: setHandlers

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
public void setHandlers(Map<Method, MethodHandler> handlers) {
    this.handlers = handlers;
}
 
开发者ID:yu199195,项目名称:happylifeplat-tcc,代码行数:4,代码来源:TccFeignHandler.java


示例9: FeignInvocationHandler

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
FeignInvocationHandler(Target target, Map<Method, MethodHandler> dispatch) {
  this.target = checkNotNull(target, "target");
  this.dispatch = checkNotNull(dispatch, "dispatch for %s", target);
}
 
开发者ID:wenwu315,项目名称:XXXX,代码行数:5,代码来源:ReflectiveFeign.java


示例10: VertxInvocationHandler

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
private VertxInvocationHandler(final Target<?> target,
    final Map<Method, MethodHandler> dispatch) {
  this.target = checkNotNull(target, "target must not be null");
  this.dispatch = checkNotNull(dispatch, "dispatch must not be null");
}
 
开发者ID:OpenFeign,项目名称:feign-vertx,代码行数:6,代码来源:VertxInvocationHandler.java


示例11: create

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
@Override
public InvocationHandler create(final Target target,
                                final Map<Method, MethodHandler> dispatch) {
  return new VertxInvocationHandler(target, dispatch);
}
 
开发者ID:OpenFeign,项目名称:feign-vertx,代码行数:6,代码来源:VertxInvocationHandler.java


示例12: ReactorInvocationHandler

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
ReactorInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch) {
    this.target = requireNonNull(target, "target");
    this.dispatch = requireNonNull(dispatch, "dispatch");
}
 
开发者ID:ilaborie,项目名称:feign-reactor,代码行数:5,代码来源:ReactorInvocationHandler.java


示例13: getHandlers

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
public Map<Method, MethodHandler> getHandlers() {
	return handlers;
}
 
开发者ID:liuyangming,项目名称:ByteTCC,代码行数:4,代码来源:CompensableFeignHandler.java


示例14: setHandlers

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
public void setHandlers(Map<Method, MethodHandler> handlers) {
	this.handlers = handlers;
}
 
开发者ID:liuyangming,项目名称:ByteTCC,代码行数:4,代码来源:CompensableFeignHandler.java


示例15: toFallbackMethod

import feign.InvocationHandlerFactory.MethodHandler; //导入依赖的package包/类
/**
 * If the method param of InvocationHandler.invoke is not accessible, i.e in a package-private
 * interface, the fallback call in hystrix command will fail cause of access restrictions. But
 * methods in dispatch are copied methods. So setting access to dispatch method doesn't take
 * effect to the method in InvocationHandler.invoke. Use map to store a copy of method to invoke
 * the fallback to bypass this and reducing the count of reflection calls.
 *
 * @return cached methods map for fallback invoking
 */
static Map<Method, Method> toFallbackMethod(Map<Method, MethodHandler> dispatch) {
  Map<Method, Method> result = new LinkedHashMap<Method, Method>();
  for (Method method : dispatch.keySet()) {
    method.setAccessible(true);
    result.put(method, method);
  }
  return result;
}
 
开发者ID:wenwu315,项目名称:XXXX,代码行数:18,代码来源:HystrixInvocationHandler.java



注:本文中的feign.InvocationHandlerFactory.MethodHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StoredPaymentChannelClientStates类代码示例发布时间:2022-05-22
下一篇:
Java CredentialsMatcher类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap