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 = "Route Group") 032 String getRouteGroup(); 033 034 @ManagedAttribute(description = "Route Properties") 035 TabularData getRouteProperties(); 036 037 @ManagedAttribute(description = "Route Description") 038 String getDescription(); 039 040 @ManagedAttribute(description = "Route Source Location") 041 String getSourceLocation(); 042 043 @ManagedAttribute(description = "Route Source Location (Short)") 044 String getSourceLocationShort(); 045 046 @ManagedAttribute(description = "Route Configuration ID") 047 String getRouteConfigurationId(); 048 049 @ManagedAttribute(description = "Route Endpoint URI", mask = true) 050 String getEndpointUri(); 051 052 @ManagedAttribute(description = "Route State") 053 String getState(); 054 055 @ManagedAttribute(description = "Route Uptime [human readable text]") 056 String getUptime(); 057 058 @ManagedAttribute(description = "Route Uptime [milliseconds]") 059 long getUptimeMillis(); 060 061 @ManagedAttribute(description = "Camel ID") 062 String getCamelId(); 063 064 @ManagedAttribute(description = "Camel ManagementName") 065 String getCamelManagementName(); 066 067 @ManagedAttribute(description = "Tracing") 068 Boolean getTracing(); 069 070 @ManagedAttribute(description = "Tracing") 071 void setTracing(Boolean tracing); 072 073 @ManagedAttribute(description = "Message History") 074 Boolean getMessageHistory(); 075 076 @ManagedAttribute(description = "Whether security mask for Logging is enabled") 077 Boolean getLogMask(); 078 079 @ManagedAttribute(description = "Route Policy List") 080 String getRoutePolicyList(); 081 082 @ManagedAttribute(description = "Average load over the last minute") 083 String getLoad01(); 084 085 @ManagedAttribute(description = "Average load over the last five minutes") 086 String getLoad05(); 087 088 @ManagedAttribute(description = "Average load over the last fifteen minutes") 089 String getLoad15(); 090 091 @ManagedAttribute(description = "Throughput message/second") 092 String getThroughput(); 093 094 @ManagedOperation(description = "Start route") 095 void start() throws Exception; 096 097 @ManagedOperation(description = "Stop route") 098 void stop() throws Exception; 099 100 @ManagedOperation(description = "Stop and marks the route as failed (health-check reporting as DOWN)") 101 void stopAndFail() throws Exception; 102 103 @ManagedOperation(description = "Stop route (using timeout in seconds)") 104 void stop(long timeout) throws Exception; 105 106 @ManagedOperation(description = "Stop route, abort stop after timeout (in seconds)") 107 boolean stop(Long timeout, Boolean abortAfterTimeout) throws Exception; 108 109 @ManagedOperation(description = "Remove route (must be stopped)") 110 boolean remove() throws Exception; 111 112 @ManagedOperation(description = "Restarts route (1 second delay before starting)") 113 void restart() throws Exception; 114 115 @ManagedOperation(description = "Restarts route (using delay in seconds before starting)") 116 void restart(long delay) throws Exception; 117 118 @ManagedOperation(description = "Dumps the route as XML") 119 String dumpRouteAsXml() throws Exception; 120 121 @ManagedOperation(description = "Dumps the route as XML") 122 String dumpRouteAsXml(boolean resolvePlaceholders) throws Exception; 123 124 @ManagedOperation(description = "Dumps the route as YAML") 125 String dumpRouteAsYaml() throws Exception; 126 127 @ManagedOperation(description = "Dumps the route as YAML") 128 String dumpRouteAsYaml(boolean resolvePlaceholders) throws Exception; 129 130 @ManagedOperation(description = "Dumps the route as YAML") 131 String dumpRouteAsYaml(boolean resolvePlaceholders, boolean uriAsParameters) throws Exception; 132 133 @ManagedOperation(description = "Dumps the route stats as XML") 134 String dumpRouteStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception; 135 136 @ManagedOperation(description = "Dumps the route and steps stats as XML") 137 String dumpStepStatsAsXml(boolean fullStats) throws Exception; 138 139 @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") 140 String dumpRouteSourceLocationsAsXml() throws Exception; 141 142 @ManagedOperation(description = "Reset counters") 143 void reset(boolean includeProcessors) throws Exception; 144 145 @ManagedAttribute(description = "Oldest inflight exchange duration") 146 Long getOldestInflightDuration(); 147 148 @ManagedAttribute(description = "Oldest inflight exchange id") 149 String getOldestInflightExchangeId(); 150 151 @ManagedAttribute(description = "Is using route controller") 152 Boolean getHasRouteController(); 153 154 @ManagedAttribute(description = "Last error") 155 RouteError getLastError(); 156 157 @ManagedOperation(description = "IDs for the processors that are part of this route") 158 Collection<String> processorIds() throws Exception; 159}