001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.camel.api.management.mbean;
018    
019    import java.util.Date;
020    
021    import org.apache.camel.api.management.ManagedAttribute;
022    import org.apache.camel.api.management.ManagedOperation;
023    
024    public interface ManagedPerformanceCounterMBean extends ManagedCounterMBean {
025    
026        @ManagedAttribute(description = "Number of completed exchanges")
027        long getExchangesCompleted() throws Exception;
028    
029        @ManagedAttribute(description = "Number of failed exchanges")
030        long getExchangesFailed() throws Exception;
031    
032        @ManagedAttribute(description = "Number of failures handled")
033        long getFailuresHandled() throws Exception;
034    
035        @ManagedAttribute(description = "Number of redeliveries (internal only)")
036        long getRedeliveries() throws Exception;
037    
038        @ManagedAttribute(description = "Number of external initiated redeliveries (such as from JMS broker)")
039        long getExternalRedeliveries() throws Exception;
040    
041        @ManagedAttribute(description = "Min Processing Time [milliseconds]")
042        long getMinProcessingTime() throws Exception;
043    
044        @ManagedAttribute(description = "Mean Processing Time [milliseconds]")
045        long getMeanProcessingTime() throws Exception;
046    
047        @ManagedAttribute(description = "Max Processing Time [milliseconds]")
048        long getMaxProcessingTime() throws Exception;
049    
050        @ManagedAttribute(description = "Total Processing Time [milliseconds]")
051        long getTotalProcessingTime() throws Exception;
052    
053        @ManagedAttribute(description = "Last Processing Time [milliseconds]")
054        long getLastProcessingTime() throws Exception;
055    
056        @ManagedAttribute(description = "Delta Processing Time [milliseconds]")
057        long getDeltaProcessingTime() throws Exception;
058    
059        @ManagedAttribute(description = "Last Exchange Completed Timestamp")
060        Date getLastExchangeCompletedTimestamp();
061    
062        @ManagedAttribute(description = "Last Exchange Completed ExchangeId")
063        String getLastExchangeCompletedExchangeId();
064    
065        @ManagedAttribute(description = "First Exchange Completed Timestamp")
066        Date getFirstExchangeCompletedTimestamp();
067    
068        @ManagedAttribute(description = "First Exchange Completed ExchangeId")
069        String getFirstExchangeCompletedExchangeId();
070    
071        @ManagedAttribute(description = "Last Exchange Failed Timestamp")
072        Date getLastExchangeFailureTimestamp();
073    
074        @ManagedAttribute(description = "Last Exchange Failed ExchangeId")
075        String getLastExchangeFailureExchangeId();
076    
077        @ManagedAttribute(description = "First Exchange Failed Timestamp")
078        Date getFirstExchangeFailureTimestamp();
079    
080        @ManagedAttribute(description = "First Exchange Failed ExchangeId")
081        String getFirstExchangeFailureExchangeId();
082    
083        @ManagedAttribute(description = "Statistics enabled")
084        boolean isStatisticsEnabled();
085    
086        @ManagedAttribute(description = "Statistics enabled")
087        void setStatisticsEnabled(boolean statisticsEnabled);
088    
089        @ManagedOperation(description = "Dumps the statistics as XML")
090        String dumpStatsAsXml(boolean fullStats);
091    
092    }