io.micronaut.context.annotation.Factory Java Examples
The following examples show how to use
io.micronaut.context.annotation.Factory.
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: GrpcNameResolverFactory.java From micronaut-grpc with Apache License 2.0 | 5 votes |
/** * A GRPC name resolver factory that integrates with Micronaut's discovery client. * @param discoveryClient The discovery client * @param serviceInstanceLists The service instance list * @return The name resolver */ @Singleton @Requires(beans = DiscoveryClient.class) @Requires(property = ENABLED, value = StringUtils.TRUE, defaultValue = StringUtils.FALSE) protected NameResolver.Factory nameResolverFactory( DiscoveryClient discoveryClient, List<ServiceInstanceList> serviceInstanceLists) { return new GrpcNameResolverProvider(discoveryClient, serviceInstanceLists); }
Example #2
Source File: GrpcNameResolverFactory.java From micronaut-grpc with Apache License 2.0 | 5 votes |
/** * A GRPC name resolver factory that integrates with Micronaut's discovery client. * @param discoveryClient The discovery client * @param serviceInstanceLists The service instance list * @return The name resolver */ @Singleton @Requires(beans = DiscoveryClient.class) @Requires(property = ENABLED, value = StringUtils.TRUE, defaultValue = StringUtils.FALSE) protected NameResolver.Factory nameResolverFactory( DiscoveryClient discoveryClient, List<ServiceInstanceList> serviceInstanceLists) { return new GrpcNameResolverProvider(discoveryClient, serviceInstanceLists); }
Example #3
Source File: ConfigurationAnnotationMapper.java From micronaut-spring with Apache License 2.0 | 5 votes |
@Override protected List<AnnotationValue<?>> mapInternal(AnnotationValue<Annotation> annotation, VisitorContext visitorContext) { List<AnnotationValue<?>> mappedAnnotations = new ArrayList<>(2); mappedAnnotations.add(AnnotationValue.builder(Factory.class) .build()); mappedAnnotations.add(AnnotationValue.builder(SpringConfigurationAdvice.class).build()); return mappedAnnotations; }
Example #4
Source File: StackdriverSenderFactory.java From micronaut-gcp with Apache License 2.0 | 4 votes |
/** * The {@link StackdriverTracePropagation#FACTORY} as a bean. * @return The bean. */ @Singleton @Requires(beans = StackdriverSender.class) protected Propagation.Factory stackdriverPropagation() { return StackdriverTracePropagation.FACTORY; }