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 javax.management.openmbean.TabularData;
020
021import org.apache.camel.api.management.ManagedAttribute;
022import org.apache.camel.api.management.ManagedOperation;
023import org.apache.camel.meta.Experimental;
024
025public interface ManagedRouteMBean extends ManagedPerformanceCounterMBean {
026
027    @ManagedAttribute(description = "Route ID")
028    String getRouteId();
029
030    @ManagedAttribute(description = "Route Group")
031    String getRouteGroup();
032
033    @ManagedAttribute(description = "Route Properties")
034    TabularData getRouteProperties();
035
036    @ManagedAttribute(description = "Route Description")
037    String getDescription();
038
039    @ManagedAttribute(description = "Route Endpoint URI", mask = true)
040    String getEndpointUri();
041
042    @ManagedAttribute(description = "Route State")
043    String getState();
044
045    @ManagedAttribute(description = "Route Uptime [human readable text]")
046    String getUptime();
047
048    @ManagedAttribute(description = "Route Uptime [milliseconds]")
049    long getUptimeMillis();
050
051    @ManagedAttribute(description = "Camel ID")
052    String getCamelId();
053
054    @ManagedAttribute(description = "Camel ManagementName")
055    String getCamelManagementName();
056
057    @ManagedAttribute(description = "Tracing")
058    Boolean getTracing();
059
060    @ManagedAttribute(description = "Tracing")
061    void setTracing(Boolean tracing);
062
063    @ManagedAttribute(description = "Message History")
064    Boolean getMessageHistory();
065
066    @ManagedAttribute(description = "Whether security mask for Logging is enabled")
067    Boolean getLogMask();
068
069    @ManagedAttribute(description = "Route Policy List")
070    String getRoutePolicyList();
071
072    @ManagedAttribute(description = "Average load over the last minute")
073    String getLoad01();
074
075    @ManagedAttribute(description = "Average load over the last five minutes")
076    String getLoad05();
077
078    @ManagedAttribute(description = "Average load over the last fifteen minutes")
079    String getLoad15();
080
081    @ManagedOperation(description = "Start route")
082    void start() throws Exception;
083
084    @ManagedOperation(description = "Stop route")
085    void stop() throws Exception;
086
087    @ManagedOperation(description = "Stop route (using timeout in seconds)")
088    void stop(long timeout) throws Exception;
089
090    @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)")
091    boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception;
092
093    @ManagedOperation(description = "Remove route (must be stopped)")
094    boolean remove() throws Exception;
095
096    @ManagedOperation(description = "Restarts route (1 second delay before starting)")
097    void restart() throws Exception;
098
099    @ManagedOperation(description = "Restarts route (using delay in seconds before starting)")
100    void restart(long delay) throws Exception;
101
102    @ManagedOperation(description = "Dumps the route as XML")
103    String dumpRouteAsXml() throws Exception;
104
105    @ManagedOperation(description = "Dumps the route as XML")
106    String dumpRouteAsXml(boolean resolvePlaceholders) throws Exception;
107
108    @ManagedOperation(description = "Dumps the route as XML")
109    String dumpRouteAsXml(boolean resolvePlaceholders, boolean resolveDelegateEndpoints) throws Exception;
110
111    @ManagedOperation(description = "Updates the route from XML")
112    void updateRouteFromXml(String xml) throws Exception;
113
114    @ManagedOperation(description = "Dumps the routes stats as XML")
115    String dumpRouteStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception;
116
117    @ManagedOperation(description = "Dumps the routes and steps stats as XML")
118    String dumpStepStatsAsXml(boolean fullStats) throws Exception;
119
120    @ManagedOperation(description = "Reset counters")
121    void reset(boolean includeProcessors) throws Exception;
122
123    @ManagedAttribute(description = "Oldest inflight exchange duration")
124    Long getOldestInflightDuration();
125
126    @ManagedAttribute(description = "Oldest inflight exchange id")
127    String getOldestInflightExchangeId();
128
129    @Experimental
130    @ManagedAttribute(description = "Route controller")
131    Boolean getHasRouteController();
132
133    @Experimental
134    @ManagedAttribute(description = "Last error")
135    RouteError getLastError();
136}