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 /** 037 * @deprecated use {@link #getExchangesInflight()} 038 */ 039 @ManagedAttribute(description = "Current number of inflight Exchanges") 040 @Deprecated 041 Integer getInflightExchanges(); 042 043 @ManagedAttribute(description = "Camel ID") 044 String getCamelId(); 045 046 @ManagedAttribute(description = "Camel ManagementName") 047 String getCamelManagementName(); 048 049 @ManagedAttribute(description = "Tracing") 050 Boolean getTracing(); 051 052 @ManagedAttribute(description = "Tracing") 053 void setTracing(Boolean tracing); 054 055 @ManagedAttribute(description = "Message History") 056 Boolean getMessageHistory(); 057 058 @ManagedAttribute(description = "Route Policy List") 059 String getRoutePolicyList(); 060 061 @ManagedAttribute(description = "Average load over the last minute") 062 String getLoad01(); 063 064 @ManagedAttribute(description = "Average load over the last five minutes") 065 String getLoad05(); 066 067 @ManagedAttribute(description = "Average load over the last fifteen minutes") 068 String getLoad15(); 069 070 @ManagedOperation(description = "Start route") 071 void start() throws Exception; 072 073 @ManagedOperation(description = "Stop route") 074 void stop() throws Exception; 075 076 @ManagedOperation(description = "Stop route (using timeout in seconds)") 077 void stop(long timeout) throws Exception; 078 079 @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)") 080 boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception; 081 082 /** 083 * @deprecated will be removed in the near future. Use stop and remove instead 084 */ 085 @ManagedOperation(description = "Shutdown route") 086 @Deprecated 087 void shutdown() throws Exception; 088 089 /** 090 * @deprecated will be removed in the near future. Use stop and remove instead 091 */ 092 @ManagedOperation(description = "Shutdown route (using timeout in seconds)") 093 @Deprecated 094 void shutdown(long timeout) throws Exception; 095 096 @ManagedOperation(description = "Remove route (must be stopped)") 097 boolean remove() throws Exception; 098 099 @ManagedOperation(description = "Dumps the route as XML") 100 String dumpRouteAsXml() throws Exception; 101 102 @ManagedOperation(description = "Updates the route from XML") 103 void updateRouteFromXml(String xml) throws Exception; 104 105 @ManagedOperation(description = "Dumps the routes stats as XML") 106 String dumpRouteStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception; 107 108 @ManagedOperation(description = "Reset counters") 109 void reset(boolean includeProcessors) throws Exception; 110 111 @ManagedOperation(description = "Returns the JSON representation of all the static and dynamic endpoints defined in this route") 112 String createRouteStaticEndpointJson(); 113 114 @ManagedOperation(description = "Returns the JSON representation of all the static endpoints (and possible dynamic) defined in this route") 115 String createRouteStaticEndpointJson(boolean includeDynamic); 116 117 @ManagedAttribute(description = "Oldest inflight exchange duration") 118 Long getOldestInflightDuration(); 119 120 @ManagedAttribute(description = "Oldest inflight exchange id") 121 String getOldestInflightExchangeId(); 122 123 124}