Package org.apache.camel.component.metrics.counter

Examples of org.apache.camel.component.metrics.counter.CounterEndpoint


        params.put("decrement", value - 1);

        result = component.createEndpoint("metrics:counter:long.counter", "counter:long.counter", params);
        assertThat(result, is(notNullValue()));
        assertThat(result, is(instanceOf(CounterEndpoint.class)));
        CounterEndpoint ce = (CounterEndpoint) result;
        assertThat(ce.getIncrement(), is(value + 1));
        assertThat(ce.getDecrement(), is(value - 1));
        assertThat(ce.getMetricsName(), is("long.counter"));
        assertThat(ce.getRegistry(), is(metricRegistry));

        inOrder.verify(camelContext, times(1)).getRegistry();
        inOrder.verify(camelRegistry, times(1)).lookupByNameAndType(MetricsComponent.METRIC_REGISTRY_NAME, MetricRegistry.class);
        inOrder.verify(camelContext, times(2)).getTypeConverter();
        inOrder.verifyNoMoreInteractions();
View Full Code Here


    Endpoint createNewEndpoint(MetricRegistry registry, MetricsType type, String metricsName) {
        Endpoint endpoint;
        switch (type) {
        case COUNTER:
            endpoint = new CounterEndpoint(registry, metricsName);
            break;
        case METER:
            endpoint = new MeterEndpoint(registry, metricsName);
            break;
        case HISTOGRAM:
View Full Code Here

TOP

Related Classes of org.apache.camel.component.metrics.counter.CounterEndpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.