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 Endpoint URI", mask = true)
039    String getEndpointUri();
040
041    @ManagedAttribute(description = "Route State")
042    String getState();
043
044    @ManagedAttribute(description = "Route Uptime [human readable text]")
045    String getUptime();
046
047    @ManagedAttribute(description = "Route Uptime [milliseconds]")
048    long getUptimeMillis();
049
050    @ManagedAttribute(description = "Camel ID")
051    String getCamelId();
052
053    @ManagedAttribute(description = "Camel ManagementName")
054    String getCamelManagementName();
055
056    @ManagedAttribute(description = "Tracing")
057    Boolean getTracing();
058
059    @ManagedAttribute(description = "Tracing")
060    void setTracing(Boolean tracing);
061
062    @ManagedAttribute(description = "Message History")
063    Boolean getMessageHistory();
064
065    @ManagedAttribute(description = "Whether security mask for Logging is enabled")
066    Boolean getLogMask();
067
068    @ManagedAttribute(description = "Route Policy List")
069    String getRoutePolicyList();
070
071    @ManagedAttribute(description = "Average load over the last minute")
072    String getLoad01();
073
074    @ManagedAttribute(description = "Average load over the last five minutes")
075    String getLoad05();
076
077    @ManagedAttribute(description = "Average load over the last fifteen minutes")
078    String getLoad15();
079
080    @ManagedOperation(description = "Start route")
081    void start() throws Exception;
082
083    @ManagedOperation(description = "Stop route")
084    void stop() throws Exception;
085
086    @ManagedOperation(description = "Stop route (using timeout in seconds)")
087    void stop(long timeout) throws Exception;
088
089    @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)")
090    boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception;
091
092    @ManagedOperation(description = "Remove route (must be stopped)")
093    boolean remove() throws Exception;
094
095    @ManagedOperation(description = "Restarts route (1 second delay before starting)")
096    void restart() throws Exception;
097
098    @ManagedOperation(description = "Restarts route (using delay in seconds before starting)")
099    void restart(long delay) throws Exception;
100
101    @ManagedOperation(description = "Dumps the route as XML")
102    String dumpRouteAsXml() throws Exception;
103
104    @ManagedOperation(description = "Dumps the route as XML")
105    String dumpRouteAsXml(boolean resolvePlaceholders) throws Exception;
106
107    @ManagedOperation(description = "Dumps the route as XML")
108    String dumpRouteAsXml(boolean resolvePlaceholders, boolean resolveDelegateEndpoints) throws Exception;
109
110    @Deprecated
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    @ManagedAttribute(description = "Route controller")
130    Boolean getHasRouteController();
131
132    @ManagedAttribute(description = "Last error")
133    RouteError getLastError();
134}