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 */
017package org.apache.camel.api.management.mbean;
018
019import java.util.Date;
020
021import org.apache.camel.api.management.ManagedAttribute;
022import org.apache.camel.api.management.ManagedOperation;
023
024public 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 inflight exchanges")
033    long getExchangesInflight() throws Exception;
034
035    @ManagedAttribute(description = "Number of failures handled")
036    long getFailuresHandled() throws Exception;
037
038    @ManagedAttribute(description = "Number of redeliveries (internal only)")
039    long getRedeliveries() throws Exception;
040
041    @ManagedAttribute(description = "Number of external initiated redeliveries (such as from JMS broker)")
042    long getExternalRedeliveries() throws Exception;
043
044    @ManagedAttribute(description = "Min Processing Time [milliseconds]")
045    long getMinProcessingTime() throws Exception;
046
047    @ManagedAttribute(description = "Mean Processing Time [milliseconds]")
048    long getMeanProcessingTime() throws Exception;
049
050    @ManagedAttribute(description = "Max Processing Time [milliseconds]")
051    long getMaxProcessingTime() throws Exception;
052
053    @ManagedAttribute(description = "Total Processing Time [milliseconds]")
054    long getTotalProcessingTime() throws Exception;
055
056    @ManagedAttribute(description = "Last Processing Time [milliseconds]")
057    long getLastProcessingTime() throws Exception;
058
059    @ManagedAttribute(description = "Delta Processing Time [milliseconds]")
060    long getDeltaProcessingTime() throws Exception;
061
062    @ManagedAttribute(description = "Last Exchange Completed Timestamp")
063    Date getLastExchangeCompletedTimestamp();
064
065    @ManagedAttribute(description = "Last Exchange Completed ExchangeId")
066    String getLastExchangeCompletedExchangeId();
067
068    @ManagedAttribute(description = "First Exchange Completed Timestamp")
069    Date getFirstExchangeCompletedTimestamp();
070
071    @ManagedAttribute(description = "First Exchange Completed ExchangeId")
072    String getFirstExchangeCompletedExchangeId();
073
074    @ManagedAttribute(description = "Last Exchange Failed Timestamp")
075    Date getLastExchangeFailureTimestamp();
076
077    @ManagedAttribute(description = "Last Exchange Failed ExchangeId")
078    String getLastExchangeFailureExchangeId();
079
080    @ManagedAttribute(description = "First Exchange Failed Timestamp")
081    Date getFirstExchangeFailureTimestamp();
082
083    @ManagedAttribute(description = "First Exchange Failed ExchangeId")
084    String getFirstExchangeFailureExchangeId();
085
086    @ManagedAttribute(description = "Statistics enabled")
087    boolean isStatisticsEnabled();
088
089    @ManagedAttribute(description = "Statistics enabled")
090    void setStatisticsEnabled(boolean statisticsEnabled);
091
092    @ManagedOperation(description = "Dumps the statistics as XML")
093    String dumpStatsAsXml(boolean fullStats);
094
095}