Examples of ThroughputLogger


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

                camelLogger = new CamelLogger(loggerName, loggingLevel, getMarker());
            } else {
                camelLogger = new CamelLogger(providedLogger, loggingLevel, getMarker());
            }
            if (getGroupSize() != null) {
                logger = new ThroughputLogger(camelLogger, getGroupSize());
            } else if (getGroupInterval() != null) {
                Boolean groupActiveOnly = getGroupActiveOnly() != null ? getGroupActiveOnly() : Boolean.TRUE;
                Long groupDelay = getGroupDelay();
                logger = new ThroughputLogger(camelLogger, this.getCamelContext(), getGroupInterval(), groupDelay, groupActiveOnly);
            } else {
                logger = new CamelLogProcessor(camelLogger, localFormatter);
            }
            // the logger is the processor
            setProcessor(this.logger);
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        setProperties(endpoint, parameters);

        CamelLogger camelLogger = new CamelLogger(remaining, level, endpoint.getMarker());
        Processor logger;
        if (endpoint.getGroupSize() != null) {
            logger = new ThroughputLogger(camelLogger, endpoint.getGroupSize());
        } else if (endpoint.getGroupInterval() != null) {
            Boolean groupActiveOnly = endpoint.getGroupActiveOnly() != null ? endpoint.getGroupActiveOnly() : Boolean.TRUE;
            Long groupDelay = endpoint.getGroupDelay();
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        setProperties(endpoint, parameters);

        CamelLogger camelLogger = new CamelLogger(remaining, level, endpoint.getMarker());
        Processor logger;
        if (endpoint.getGroupSize() != null) {
            logger = new ThroughputLogger(camelLogger, endpoint.getGroupSize());
        } else if (endpoint.getGroupInterval() != null) {
            Boolean groupActiveOnly = endpoint.getGroupActiveOnly() != null ? endpoint.getGroupActiveOnly() : Boolean.TRUE;
            Long groupDelay = endpoint.getGroupDelay();
            logger = new ThroughputLogger(camelLogger, this.getCamelContext(), endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
        } else {
            // first, try to use the user-specified formatter (or the one picked up from the Registry and transferred to
            // the property by a previous endpoint initialisation); if null, try to pick it up from the Registry now
            ExchangeFormatter localFormatter = exchangeFormatter;
            if (localFormatter == null) {
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

        LoggingLevel level = getLoggingLevel(parameters);
        Integer groupSize = getAndRemoveParameter(parameters, "groupSize", Integer.class);

        Logger logger;
        if (groupSize != null) {
            logger = new ThroughputLogger(remaining, level, ObjectConverter.toInteger(groupSize));
        } else {
            LogFormatter formatter = new LogFormatter();
            IntrospectionSupport.setProperties(formatter, parameters);

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

Examples of org.apache.camel.processor.ThroughputLogger

        LoggingLevel level = getLoggingLevel(parameters);
        Integer groupSize = getAndRemoveParameter(parameters, "groupSize", Integer.class);

        Logger logger;
        if (groupSize != null) {
            logger = new ThroughputLogger(remaining, level, ObjectConverter.toInteger(groupSize));
        } else {
            LogFormatter formatter = new LogFormatter();
            IntrospectionSupport.setProperties(formatter, parameters);

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

Examples of org.apache.camel.processor.ThroughputLogger

            LOG.error(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

    @Override
    protected Endpoint<Exchange> createEndpoint(String uri, String remaining, Map 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.mock:" + remaining, value);
            endpoint.setReporter(reporter);
        }
        return endpoint;
    }
View Full Code Here

Examples of org.apache.camel.processor.ThroughputLogger

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

    protected ThroughputLogger createReporter() {
        CamelLogger logger = new CamelLogger(this.getEndpointUri());
        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() {
        CamelLogger logger = new CamelLogger(endpoint.getEndpointUri());
        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.