Annotation Type RegistryScope
-
@Documented @Qualifier @Retention(RUNTIME) @Target({METHOD,FIELD,PARAMETER,ANNOTATION_TYPE}) public @interface RegistryScope
Specifies the scope of Metric Registry to inject.This can be used to obtain the respective scoped
MetricRegistry
:@Inject @RegistryScope(scope=MetricRegistry.APPLICATION_SCOPE) MetricRegistry appRegistry; @Inject @RegistryScope(scope="customScope") MetricRegistry customRegistry;
MetricRegistry.APPLICATION_SCOPE
,MetricRegistry.BASE_SCOPE
andMetricRegistry.VENDOR_SCOPE
- Author:
- Raymond Lam
-
-
Element Detail
-
scope
String scope
The scope of the MetricRegistry.- Returns:
- Indicates the scope of the MetricRegistry to be injected. The MicroProfile runtimes provides
application
,base
andvendor
scopes automatically and creates user-defined scopes as needed. seeMetricRegistry.APPLICATION_SCOPE
,MetricRegistry.BASE_SCOPE
andMetricRegistry.VENDOR_SCOPE
- Default:
- "application"
-
-