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 org.apache.camel.api.management.ManagedAttribute; 020import org.apache.camel.api.management.ManagedOperation; 021 022public 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", mask = true) 031 String getEndpointUri(); 032 033 @ManagedAttribute(description = "Route State") 034 String getState(); 035 036 @ManagedAttribute(description = "Route Uptime [human readable text]") 037 String getUptime(); 038 039 @ManagedAttribute(description = "Route Uptime [milliseconds]") 040 long getUptimeMillis(); 041 042 /** 043 * @deprecated use {@link #getExchangesInflight()} 044 */ 045 @ManagedAttribute(description = "Current number of inflight Exchanges") 046 @Deprecated 047 Integer getInflightExchanges(); 048 049 @ManagedAttribute(description = "Camel ID") 050 String getCamelId(); 051 052 @ManagedAttribute(description = "Camel ManagementName") 053 String getCamelManagementName(); 054 055 @ManagedAttribute(description = "Tracing") 056 Boolean getTracing(); 057 058 @ManagedAttribute(description = "Tracing") 059 void setTracing(Boolean tracing); 060 061 @ManagedAttribute(description = "Message History") 062 Boolean getMessageHistory(); 063 064 @ManagedAttribute(description = "Route Policy List") 065 String getRoutePolicyList(); 066 067 @ManagedAttribute(description = "Average load over the last minute") 068 String getLoad01(); 069 070 @ManagedAttribute(description = "Average load over the last five minutes") 071 String getLoad05(); 072 073 @ManagedAttribute(description = "Average load over the last fifteen minutes") 074 String getLoad15(); 075 076 @ManagedOperation(description = "Start route") 077 void start() throws Exception; 078 079 @ManagedOperation(description = "Stop route") 080 void stop() throws Exception; 081 082 @ManagedOperation(description = "Stop route (using timeout in seconds)") 083 void stop(long timeout) throws Exception; 084 085 @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)") 086 boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception; 087 088 /** 089 * @deprecated will be removed in the near future. Use stop and remove instead 090 */ 091 @ManagedOperation(description = "Shutdown route") 092 @Deprecated 093 void shutdown() throws Exception; 094 095 /** 096 * @deprecated will be removed in the near future. Use stop and remove instead 097 */ 098 @ManagedOperation(description = "Shutdown route (using timeout in seconds)") 099 @Deprecated 100 void shutdown(long timeout) throws Exception; 101 102 @ManagedOperation(description = "Remove route (must be stopped)") 103 boolean remove() throws Exception; 104 105 @ManagedOperation(description = "Dumps the route as XML") 106 String dumpRouteAsXml() throws Exception; 107 108 @ManagedOperation(description = "Dumps the route as XML") 109 String dumpRouteAsXml(boolean resolvePlaceholders) 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 = "Reset counters") 118 void reset(boolean includeProcessors) throws Exception; 119 120 @ManagedOperation(description = "Returns the JSON representation of all the static and dynamic endpoints defined in this route") 121 String createRouteStaticEndpointJson(); 122 123 @ManagedOperation(description = "Returns the JSON representation of all the static endpoints (and possible dynamic) defined in this route") 124 String createRouteStaticEndpointJson(boolean includeDynamic); 125 126 @ManagedAttribute(description = "Oldest inflight exchange duration") 127 Long getOldestInflightDuration(); 128 129 @ManagedAttribute(description = "Oldest inflight exchange id") 130 String getOldestInflightExchangeId(); 131 132 133}