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