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