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 org.apache.camel.api.management.ManagedAttribute;
020    import org.apache.camel.api.management.ManagedOperation;
021    
022    public interface ManagedRouteMBean extends ManagedPerformanceCounterMBean {
023    
024        @ManagedAttribute(description = "Route ID")
025        String getRouteId();
026    
027        @ManagedAttribute(description = "Route Description")
028        String getDescription();
029    
030        @ManagedAttribute(description = "Route Endpoint URI")
031        String getEndpointUri();
032    
033        @ManagedAttribute(description = "Route State")
034        String getState();
035    
036        @ManagedAttribute(description = "Current number of inflight Exchanges")
037        Integer getInflightExchanges();
038    
039        @ManagedAttribute(description = "Camel ID")
040        String getCamelId();
041    
042        @ManagedAttribute(description = "Tracing")
043        Boolean getTracing();
044    
045        @ManagedAttribute(description = "Tracing")
046        void setTracing(Boolean tracing);
047    
048        @ManagedAttribute(description = "Route Policy List")
049        String getRoutePolicyList();
050    
051        @ManagedAttribute(description = "Average load over the last minute")
052        String getLoad01();
053    
054        @ManagedAttribute(description = "Average load over the last five minutes")
055        String getLoad05();
056    
057        @ManagedAttribute(description = "Average load over the last fifteen minutes")
058        String getLoad15();
059    
060        @ManagedOperation(description = "Start route")
061        void start() throws Exception;
062    
063        @ManagedOperation(description = "Stop route")
064        void stop() throws Exception;
065    
066        @ManagedOperation(description = "Stop route (using timeout in seconds)")
067        void stop(long timeout) throws Exception;
068    
069        @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)")
070        boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception;
071    
072        /**
073         * @deprecated will be removed in the near future. Use stop and remove instead
074         */
075        @ManagedOperation(description = "Shutdown route")
076        @Deprecated
077        void shutdown() throws Exception;
078    
079        /**
080         * @deprecated will be removed in the near future. Use stop and remove instead
081         */
082        @ManagedOperation(description = "Shutdown route (using timeout in seconds)")
083        @Deprecated
084        void shutdown(long timeout) throws Exception;
085    
086        @ManagedOperation(description = "Remove route (must be stopped)")
087        boolean remove() throws Exception;
088    
089        @ManagedOperation(description = "Dumps the route as XML")
090        String dumpRouteAsXml() throws Exception;
091    
092        @ManagedOperation(description = "Updates the route from XML")
093        void updateRouteFromXml(String xml) throws Exception;
094    
095    }