Java Code Examples for feign.hystrix.HystrixFeign#Builder

The following examples show how to use feign.hystrix.HystrixFeign#Builder . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BladeHystrixTargeter.java    From blade-tool with GNU Lesser General Public License v3.0 5 votes vote down vote up
private <T> T targetWithFallbackFactory(String feignClientName, FeignContext context,
										Target.HardCodedTarget<T> target,
										HystrixFeign.Builder builder,
										Class<?> fallbackFactoryClass) {
	FallbackFactory<? extends T> fallbackFactory = (FallbackFactory<? extends T>)
		getFromContext("fallbackFactory", feignClientName, context, fallbackFactoryClass, FallbackFactory.class);
	return builder.target(target, fallbackFactory);
}
 
Example 2
Source File: BladeHystrixTargeter.java    From blade-tool with GNU Lesser General Public License v3.0 4 votes vote down vote up
private <T> T targetWithFallback(String feignClientName, FeignContext context,
								 Target.HardCodedTarget<T> target,
								 HystrixFeign.Builder builder, Class<?> fallback) {
	T fallbackInstance = getFromContext("fallback", feignClientName, context, fallback, target.type());
	return builder.target(target, fallbackInstance);
}
 
Example 3
Source File: MSF4JClient.java    From msf4j with Apache License 2.0 4 votes vote down vote up
public HystrixFeign.Builder newHystrixFeignClientBuilder() {
    return HystrixFeign.builder()
            .encoder(encoder)
            .decoder(decoder);
}