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 java.util.Collection; 020 021import javax.management.openmbean.TabularData; 022 023import org.apache.camel.api.management.ManagedAttribute; 024import org.apache.camel.api.management.ManagedOperation; 025 026public interface ManagedRouteMBean extends ManagedPerformanceCounterMBean { 027 028 @ManagedAttribute(description = "Route ID") 029 String getRouteId(); 030 031 @ManagedAttribute(description = "Node Prefix ID") 032 String getNodePrefixId(); 033 034 @ManagedAttribute(description = "Route Group") 035 String getRouteGroup(); 036 037 @ManagedAttribute(description = "Is this route created from a route template (or Kamelet)") 038 boolean isCreatedByRouteTemplate(); 039 040 @ManagedAttribute(description = "Is this route created from a Kamelet") 041 boolean isCreatedByKamelet(); 042 043 @ManagedAttribute(description = "Route Properties") 044 TabularData getRouteProperties(); 045 046 @ManagedAttribute(description = "Route Description") 047 String getDescription(); 048 049 @ManagedAttribute(description = "Route Source Location") 050 String getSourceLocation(); 051 052 @ManagedAttribute(description = "Route Source Location (Short)") 053 String getSourceLocationShort(); 054 055 @ManagedAttribute(description = "Route Configuration ID") 056 String getRouteConfigurationId(); 057 058 @ManagedAttribute(description = "Route Endpoint URI", mask = true) 059 String getEndpointUri(); 060 061 @ManagedAttribute(description = "Route State") 062 String getState(); 063 064 @ManagedAttribute(description = "Route Uptime [human readable text]") 065 String getUptime(); 066 067 @ManagedAttribute(description = "Route Uptime [milliseconds]") 068 long getUptimeMillis(); 069 070 @ManagedAttribute(description = "Camel ID") 071 String getCamelId(); 072 073 @ManagedAttribute(description = "Camel ManagementName") 074 String getCamelManagementName(); 075 076 @ManagedAttribute(description = "Tracing") 077 Boolean getTracing(); 078 079 @ManagedAttribute(description = "Tracing") 080 void setTracing(Boolean tracing); 081 082 @ManagedAttribute(description = "Message History") 083 Boolean getMessageHistory(); 084 085 @ManagedAttribute(description = "Whether security mask for Logging is enabled") 086 Boolean getLogMask(); 087 088 @ManagedAttribute(description = "Route Policy List") 089 String getRoutePolicyList(); 090 091 @ManagedAttribute(description = "Average load over the last minute") 092 String getLoad01(); 093 094 @ManagedAttribute(description = "Average load over the last five minutes") 095 String getLoad05(); 096 097 @ManagedAttribute(description = "Average load over the last fifteen minutes") 098 String getLoad15(); 099 100 @ManagedAttribute(description = "Throughput message/second") 101 String getThroughput(); 102 103 @ManagedOperation(description = "Start route") 104 void start() throws Exception; 105 106 @ManagedOperation(description = "Stop route") 107 void stop() throws Exception; 108 109 @ManagedOperation(description = "Stop and marks the route as failed (health-check reporting as DOWN)") 110 void stopAndFail() throws Exception; 111 112 @ManagedOperation(description = "Stop route (using timeout in seconds)") 113 void stop(long timeout) throws Exception; 114 115 @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)") 116 boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception; 117 118 @ManagedOperation(description = "Remove route (must be stopped)") 119 boolean remove() throws Exception; 120 121 @ManagedOperation(description = "Restarts route (1 second delay before starting)") 122 void restart() throws Exception; 123 124 @ManagedOperation(description = "Restarts route (using delay in seconds before starting)") 125 void restart(long delay) throws Exception; 126 127 @ManagedOperation(description = "Dumps the route as XML") 128 String dumpRouteAsXml() throws Exception; 129 130 @ManagedOperation(description = "Dumps the route as XML") 131 String dumpRouteAsXml(boolean resolvePlaceholders) throws Exception; 132 133 @ManagedOperation(description = "Dumps the route as XML") 134 String dumpRouteAsXml(boolean resolvePlaceholders, boolean generatedIds) throws Exception; 135 136 @ManagedOperation(description = "Dumps the route as YAML") 137 String dumpRouteAsYaml() throws Exception; 138 139 @ManagedOperation(description = "Dumps the route as YAML") 140 String dumpRouteAsYaml(boolean resolvePlaceholders) throws Exception; 141 142 @ManagedOperation(description = "Dumps the route as YAML") 143 String dumpRouteAsYaml(boolean resolvePlaceholders, boolean uriAsParameters) throws Exception; 144 145 @ManagedOperation(description = "Dumps the route as YAML") 146 String dumpRouteAsYaml(boolean resolvePlaceholders, boolean uriAsParameters, boolean generatedIds) throws Exception; 147 148 @ManagedOperation(description = "Dumps the route stats as XML") 149 String dumpRouteStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception; 150 151 @ManagedOperation(description = "Dumps the route and steps stats as XML") 152 String dumpStepStatsAsXml(boolean fullStats) throws Exception; 153 154 @ManagedOperation(description = "Dumps the route with mappings between node ids and their source location/line-number (currently only XML and YAML routes supported) as XML") 155 String dumpRouteSourceLocationsAsXml() throws Exception; 156 157 @ManagedOperation(description = "Reset counters") 158 void reset(boolean includeProcessors) throws Exception; 159 160 @ManagedAttribute(description = "Oldest inflight exchange duration") 161 Long getOldestInflightDuration(); 162 163 @ManagedAttribute(description = "Oldest inflight exchange id") 164 String getOldestInflightExchangeId(); 165 166 @ManagedAttribute(description = "Is using route controller") 167 Boolean getHasRouteController(); 168 169 @ManagedAttribute(description = "Last error") 170 RouteError getLastError(); 171 172 @ManagedOperation(description = "IDs for the processors that are part of this route") 173 Collection<String> processorIds() throws Exception; 174 175 @ManagedOperation(description = "Updates the route from XML") 176 void updateRouteFromXml(String xml) throws Exception; 177 178 @ManagedAttribute(description = "Whether update route from XML is enabled") 179 boolean isUpdateRouteEnabled(); 180 181}