Examples of ThroughputLogger


Examples of org.apache.camel.processor.ThroughputLogger

        Long groupInterval = getAndRemoveParameter(parameters, "groupInterval", Long.class);

        CamelLogger camelLogger = new CamelLogger(remaining, level, marker);
        Processor logger;
        if (groupSize != null) {
            logger = new ThroughputLogger(camelLogger, groupSize);
        } else if (groupInterval != null) {
            Boolean groupActiveOnly = getAndRemoveParameter(parameters, "groupActiveOnly", Boolean.class, Boolean.TRUE);
            Long groupDelay = getAndRemoveParameter(parameters, "groupDelay", Long.class);
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), groupInterval, groupDelay, groupActiveOnly);
        } else {
            LogFormatter formatter = new LogFormatter();
            IntrospectionSupport.setProperties(formatter, parameters);

            logger = new CamelLogProcessor(camelLogger, formatter);
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        LoggingLevel level = getLoggingLevel(parameters);
        Object value = parameters.remove("groupSize");

        Logger logger;
        if (value != null) {
            logger = new ThroughputLogger(remaining, level, ObjectConverter.toInteger(value));
        }
        else {
            logger = new Logger(remaining, level);
        }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

    @Override
    protected Endpoint<Exchange> createEndpoint(String uri, String remaining, Map parameters) throws Exception {
        MockEndpoint endpoint = new MockEndpoint(uri, this);
        Integer value = ObjectConverter.toInteger(parameters.remove("reportGroup"));
        if (value != null) {
            Processor reporter = new ThroughputLogger("org.apache.camel.mock:" + remaining, value);
            endpoint.setReporter(reporter);
        }
        return endpoint;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

            handleException(e);
        }
    }

    protected ThroughputLogger createReporter() {
        ThroughputLogger answer = new ThroughputLogger(endpoint.getEndpointUri(), (int) endpoint.getDataSet().getReportCount());
        answer.setAction("Sent");
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        getDataSet().assertMessageExpected(this, expected, actual, index);
    }

    protected ThroughputLogger createReporter() {
        ThroughputLogger answer = new ThroughputLogger(this.getEndpointUri(), (int) this.getDataSet().getReportCount());
        answer.setAction("Received");
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        getDataSet().assertMessageExpected(this, expected, actual, index);
    }

    protected ThroughputLogger createReporter() {
        ThroughputLogger answer = new ThroughputLogger(this.getEndpointUri(), (int) this.getDataSet().getReportCount());
        answer.setAction("Received");
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        Integer groupSize = getAndRemoveParameter(parameters, "groupSize", Integer.class);
        Long groupInterval = getAndRemoveParameter(parameters, "groupInterval", Long.class);

        CamelLogger logger;
        if (groupSize != null) {
            logger = new ThroughputLogger(remaining, level, groupSize);
        } else if (groupInterval != null) {
            Boolean groupActiveOnly = getAndRemoveParameter(parameters, "groupActiveOnly", Boolean.class, Boolean.TRUE);
            Long groupDelay = getAndRemoveParameter(parameters, "groupDelay", Long.class);
            logger = new ThroughputLogger(this.getCamelContext(), remaining, level, groupInterval, groupDelay, groupActiveOnly);
        } else {
            LogFormatter formatter = new LogFormatter();
            IntrospectionSupport.setProperties(formatter, parameters);

            logger = new CamelLogger(remaining);
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

    @Override
    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        MockEndpoint endpoint = new MockEndpoint(uri, this);
        Integer value = getAndRemoveParameter(parameters, "reportGroup", Integer.class);
        if (value != null) {
            Processor reporter = new ThroughputLogger("org.apache.camel.component.mock:" + remaining, value);
            endpoint.setReporter(reporter);
        }
        return endpoint;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

    protected ThroughputLogger createReporter() {
        // must sanitize uri to avoid logging sensitive information
        String uri = URISupport.sanitizeUri(getEndpointUri());
        CamelLogger logger = new CamelLogger(uri);
        ThroughputLogger answer = new ThroughputLogger(logger, (int) this.getDataSet().getReportCount());
        answer.setAction("Received");
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

    protected ThroughputLogger createReporter() {
        // must sanitize uri to avoid logging sensitive information
        String uri = URISupport.sanitizeUri(endpoint.getEndpointUri());
        CamelLogger logger = new CamelLogger(uri);
        ThroughputLogger answer = new ThroughputLogger(logger, (int) endpoint.getDataSet().getReportCount());
        answer.setAction("Sent");
        return answer;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.