Package io.helidon.microprofile.metrics
Class MetricsCdiExtension
- java.lang.Object
-
- io.helidon.servicecommon.restcdi.HelidonRestCdiExtension<MetricsSupport>
-
- io.helidon.microprofile.metrics.MetricsCdiExtension
-
- All Implemented Interfaces:
Extension
public class MetricsCdiExtension extends HelidonRestCdiExtension<MetricsSupport>
MetricsCdiExtension class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.helidon.servicecommon.restcdi.HelidonRestCdiExtension
HelidonRestCdiExtension.WorkItemsManager<W>
-
-
Constructor Summary
Constructors Constructor Description MetricsCdiExtension()Creates a new extension instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidclearAnnotationInfo(AfterDeploymentValidation adv)Cleans up any data structures created during annotation processing but which are not needed once the CDI container has started.protected voidprocessManagedBean(ProcessManagedBean<?> pmb)Deals with a managed bean that survived vetoing, provided by concrete extension implementations.protected voidrecordProducerFields(ProcessProducerField<? extends Metric,?> ppf)Records metric producer fields defined by the application.protected voidrecordProducerMethods(ProcessProducerMethod<? extends Metric,?> ppm)Records metric producer methods defined by the application.static <E extends Member & AnnotatedElement>
voidregisterMetric(E element, Class<?> clazz, MetricUtil.LookupResult<? extends Annotation> lookupResult)Deprecated.This method is made public to migrate from metrics1 to metrics2 for gRPC, this should be refactoredprotected static voidregisterMetricsForAnnotatedSitesFromGrpcTest()Deprecated.protected Routing.BuilderregisterService(Object adv, BeanManager bm, ServerCdiExtension server)Registers the service-related endpoint, after security and as CDI initializes the app scope, returning the default routing for optional use by the caller.-
Methods inherited from class io.helidon.servicecommon.restcdi.HelidonRestCdiExtension
isConcreteNonInterceptor, isOwnProducerOrNonDefaultQualified, observeManagedBeans, producers, recordAnnotatedType, recordProducerField, recordProducerMethod, serviceSupport
-
-
-
-
Method Detail
-
registerMetric
@Deprecated public static <E extends Member & AnnotatedElement> void registerMetric(E element, Class<?> clazz, MetricUtil.LookupResult<? extends Annotation> lookupResult)
Deprecated.This method is made public to migrate from metrics1 to metrics2 for gRPC, this should be refactoredDO NOT USE THIS METHOD please.- Type Parameters:
E- type of element- Parameters:
element- elementclazz- classlookupResult- lookup result
-
registerMetricsForAnnotatedSitesFromGrpcTest
@Deprecated protected static void registerMetricsForAnnotatedSitesFromGrpcTest()
Deprecated.For test use only. This method is used from gRPC integration tests and should not be used elsewhere.
-
processManagedBean
protected void processManagedBean(ProcessManagedBean<?> pmb)
Description copied from class:HelidonRestCdiExtensionDeals with a managed bean that survived vetoing, provided by concrete extension implementations.The meaning of "process" varies among the concrete implementations. At this point, this base implementation has managed the annotation processing in a general way (e.g., only non-vetoed beans survive) and now delegates to the concrete implementations to actually respond appropriately to the bean and whichever of its members are annotated.
- Specified by:
processManagedBeanin classHelidonRestCdiExtension<MetricsSupport>- Parameters:
pmb- the managed bean, with at least one annotation of interest to the extension
-
clearAnnotationInfo
protected void clearAnnotationInfo(@Observes AfterDeploymentValidation adv)
Description copied from class:HelidonRestCdiExtensionCleans up any data structures created during annotation processing but which are not needed once the CDI container has started.- Overrides:
clearAnnotationInfoin classHelidonRestCdiExtension<MetricsSupport>- Parameters:
adv- theAfterDeploymentValidationevent
-
recordProducerFields
protected void recordProducerFields(@Observes ProcessProducerField<? extends Metric,?> ppf)
Records metric producer fields defined by the application. Ignores producers with non-default qualifiers and library producers.- Parameters:
ppf- Producer field.
-
recordProducerMethods
protected void recordProducerMethods(@Observes ProcessProducerMethod<? extends Metric,?> ppm)
Records metric producer methods defined by the application. Ignores producers with non-default qualifiers and library producers.- Parameters:
ppm- Producer method.
-
registerService
protected Routing.Builder registerService(@Observes @Priority(1010) @Initialized(javax.enterprise.context.ApplicationScoped.class) Object adv, BeanManager bm, ServerCdiExtension server)
Description copied from class:HelidonRestCdiExtensionRegisters the service-related endpoint, after security and as CDI initializes the app scope, returning the default routing for optional use by the caller.- Overrides:
registerServicein classHelidonRestCdiExtension<MetricsSupport>- Parameters:
adv- app-scoped initialization eventbm- BeanManagerserver- the ServerCdiExtension- Returns:
- default routing
-
-