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 = "Last Exchange Completed Timestamp")
057 Date getLastExchangeCompletedTimestamp();
058
059 @ManagedAttribute(description = "Last Exchange Completed ExchangeId")
060 String getLastExchangeCompletedExchangeId();
061
062 @ManagedAttribute(description = "First Exchange Completed Timestamp")
063 Date getFirstExchangeCompletedTimestamp();
064
065 @ManagedAttribute(description = "First Exchange Completed ExchangeId")
066 String getFirstExchangeCompletedExchangeId();
067
068 @ManagedAttribute(description = "Last Exchange Failed Timestamp")
069 Date getLastExchangeFailureTimestamp();
070
071 @ManagedAttribute(description = "Last Exchange Failed ExchangeId")
072 String getLastExchangeFailureExchangeId();
073
074 @ManagedAttribute(description = "First Exchange Failed Timestamp")
075 Date getFirstExchangeFailureTimestamp();
076
077 @ManagedAttribute(description = "First Exchange Failed ExchangeId")
078 String getFirstExchangeFailureExchangeId();
079
080 @ManagedAttribute(description = "Statistics enabled")
081 boolean isStatisticsEnabled();
082
083 @ManagedAttribute(description = "Statistics enabled")
084 void setStatisticsEnabled(boolean statisticsEnabled);
085
086 @ManagedOperation(description = "Dumps the statistics as XML")
087 String dumpStatsAsXml(boolean fullStats);
088
089 }