Package org.apache.synapse.aspects.statistics

Examples of org.apache.synapse.aspects.statistics.StatisticsLog


            }

            MessageTraceLog traceLog = new MessageTraceLog(record.getId());

            List<StatisticsLog> logs = record.getAllStatisticsLogs();
            StatisticsLog startLog = null;
            StatisticsLog endLog = null;
            for (StatisticsLog log : logs) {
                if (log == null) {
                    continue;
                }

                if (startLog == null && log.getComponentType() != ComponentType.ANY) {
                    startLog = log;
                } else if (startLog != null) {
                    endLog = log;
                    break;
                }
            }

            if (startLog == null || endLog == null) {
                continue;
            }

            traceLog.setType(startLog.getComponentType());
            traceLog.setResourceId(startLog.getId());

            switch (startLog.getComponentType()) {
                case PROXYSERVICE:
                    traceLog.setRequestFaultStatus(startLog.isFault() ?
                            MessageTraceLog.FAULT_STATUS_TRUE : MessageTraceLog.FAULT_STATUS_FALSE);
                    if (!endLog.isEndAnyLog()) {
                        StatisticsLog lastLog = logs.get(logs.size() - 1);
                        traceLog.setResponseFaultStatus(lastLog.isFault() ?
                                MessageTraceLog.FAULT_STATUS_TRUE : MessageTraceLog.FAULT_STATUS_FALSE);
                    }
                    break;

                case SEQUENCE:
View Full Code Here

TOP

Related Classes of org.apache.synapse.aspects.statistics.StatisticsLog

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.