com.rabbitmq.client.MetricsCollector Java Examples

The following examples show how to use com.rabbitmq.client.MetricsCollector. 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: StandardMetricsCollectorBean.java    From hammock with Apache License 2.0 5 votes vote down vote up
@Override
public MetricsCollector create(CreationalContext<MetricsCollector> creationalContext) {
    Set<Bean<?>> beans = beanManager.getBeans(MetricRegistry.class);
    Bean<?> bean = beanManager.resolve(beans);
    CreationalContext<?> metricsContext = beanManager.createCreationalContext(bean);
    MetricRegistry metricRegistry = (MetricRegistry)beanManager
            .getReference(bean, MetricRegistry.class, metricsContext);
    return new StandardMetricsCollector(metricRegistry);
}
 
Example #2
Source File: ImplementedMetricsCollectorWrapper.java    From rabbitmq-mock with Apache License 2.0 4 votes vote down vote up
private MetricsCollector mc() {
    return connectionFactory.getMetricsCollector();
}
 
Example #3
Source File: RabbitMQConfiguration.java    From hammock with Apache License 2.0 4 votes vote down vote up
public MetricsCollector getMetricsCollector() {
    return metricsCollector;
}
 
Example #4
Source File: NoOpMetricCollectorBean.java    From hammock with Apache License 2.0 4 votes vote down vote up
NoOpMetricCollectorBean(InjectionTarget<? extends MetricsCollector> injectionTarget) {
    super(injectionTarget);
}
 
Example #5
Source File: NoOpMetricCollectorBean.java    From hammock with Apache License 2.0 4 votes vote down vote up
@Override
public MetricsCollector create(CreationalContext<MetricsCollector> creationalContext) {
    return new NoOpMetricsCollector();
}
 
Example #6
Source File: MetricCollectorBean.java    From hammock with Apache License 2.0 4 votes vote down vote up
protected MetricCollectorBean(InjectionTarget<? extends MetricsCollector> injectionTarget) {
    this.injectionTarget = injectionTarget;
}
 
Example #7
Source File: MetricCollectorBean.java    From hammock with Apache License 2.0 4 votes vote down vote up
@Override
public void destroy(MetricsCollector instance, CreationalContext<MetricsCollector> creationalContext) {
    creationalContext.release();
}
 
Example #8
Source File: MetricCollectorBean.java    From hammock with Apache License 2.0 4 votes vote down vote up
@Override
public Set<Type> getTypes() {
    return new HashSet<>(asList(Object.class, MetricsCollector.class, getBeanClass()));
}
 
Example #9
Source File: StandardMetricsCollectorBean.java    From hammock with Apache License 2.0 4 votes vote down vote up
StandardMetricsCollectorBean(InjectionTarget<? extends MetricsCollector> injectionTarget, BeanManager beanManager) {
    super(injectionTarget);
    this.beanManager = beanManager;
}
 
Example #10
Source File: RabbitMQExtension.java    From hammock with Apache License 2.0 4 votes vote down vote up
public void findMetrics(@Observes ProcessBean<? extends MetricsCollector> metricsCollectorBean) {
    this.foundMetricCollectorBean = true;
}