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.Set; 020 021import org.apache.camel.api.management.ManagedAttribute; 022import org.apache.camel.api.management.ManagedOperation; 023 024public interface ManagedBacklogDebuggerMBean { 025 026 @ManagedAttribute(description = "Camel ID") 027 String getCamelId(); 028 029 @ManagedAttribute(description = "Camel ManagementName") 030 String getCamelManagementName(); 031 032 @ManagedAttribute(description = "Logging Level") 033 String getLoggingLevel(); 034 035 @ManagedAttribute(description = "Logging Level") 036 void setLoggingLevel(String level); 037 038 @ManagedAttribute(description = "Is debugger enabled") 039 boolean isEnabled(); 040 041 @ManagedOperation(description = "Enable the debugger") 042 void enableDebugger(); 043 044 @ManagedOperation(description = "Disable the debugger") 045 void disableDebugger(); 046 047 @ManagedOperation(description = "Add a breakpoint at the given node id") 048 void addBreakpoint(String nodeId); 049 050 @ManagedOperation(description = "Add a conditional breakpoint at the given node id") 051 void addConditionalBreakpoint(String nodeId, String language, String predicate); 052 053 @ManagedOperation(description = "Remote the breakpoint from the given node id (will resume suspend breakpoint first)") 054 void removeBreakpoint(String nodeId); 055 056 @ManagedOperation(description = "Remote all breakpoints (will resume all suspend breakpoints first and exists single step mode)") 057 void removeAllBreakpoints(); 058 059 @ManagedOperation(description = "Resume running from the suspended breakpoint at the given node id") 060 void resumeBreakpoint(String nodeId); 061 062 @ManagedOperation(description = "Updates the message body (uses same type as old body) on the suspended breakpoint at the given node id") 063 void setMessageBodyOnBreakpoint(String nodeId, Object body); 064 065 @ManagedOperation(description = "Updates the message body (with a new type) on the suspended breakpoint at the given node id") 066 void setMessageBodyOnBreakpoint(String nodeId, Object body, String type); 067 068 @ManagedOperation(description = "Removes the message body on the suspended breakpoint at the given node id") 069 void removeMessageBodyOnBreakpoint(String nodeId); 070 071 @ManagedOperation(description = "Updates/adds the message header (uses same type as old header value) on the suspended breakpoint at the given node id") 072 void setMessageHeaderOnBreakpoint(String nodeId, String headerName, Object value); 073 074 @ManagedOperation(description = "Removes the message header on the suspended breakpoint at the given node id") 075 void removeMessageHeaderOnBreakpoint(String nodeId, String headerName); 076 077 @ManagedOperation(description = "Updates/adds the message header (with a new type) on the suspended breakpoint at the given node id") 078 void setMessageHeaderOnBreakpoint(String nodeId, String headerName, Object value, String type); 079 080 @ManagedOperation(description = "Resume running any suspended breakpoints, and exits step mode") 081 void resumeAll(); 082 083 @ManagedOperation(description = "Starts single step debugging from the suspended breakpoint at the given node id") 084 void stepBreakpoint(String nodeId); 085 086 @ManagedAttribute(description = "Whether currently in step mode") 087 boolean isSingleStepMode(); 088 089 @ManagedOperation(description = "Steps to next node in step mode") 090 void step(); 091 092 @ManagedOperation(description = "Return the node ids which has breakpoints") 093 Set<String> getBreakpoints(); 094 095 @ManagedOperation(description = "Return the node ids which is currently suspended") 096 Set<String> getSuspendedBreakpointNodeIds(); 097 098 @ManagedOperation(description = "Disables a breakpoint") 099 void disableBreakpoint(String nodeId); 100 101 @ManagedOperation(description = "Enables a breakpoint which has been disabled") 102 void enableBreakpoint(String nodeId); 103 104 @ManagedAttribute(description = "Number of maximum chars in the message body in the trace message. Use zero or negative value to have unlimited size.") 105 int getBodyMaxChars(); 106 107 @ManagedAttribute(description = "Number of maximum chars in the message body in the trace message. Use zero or negative value to have unlimited size.") 108 void setBodyMaxChars(int bodyMaxChars); 109 110 @ManagedAttribute(description = "Fallback Timeout in seconds when block the message processing in Camel.") 111 long getFallbackTimeout(); 112 113 @ManagedAttribute(description = "Fallback Timeout in seconds when block the message processing in Camel.") 114 void setFallbackTimeout(long fallbackTimeout); 115 116 @ManagedAttribute(description = "Whether to include stream based message body in the trace message.") 117 boolean isBodyIncludeStreams(); 118 119 @ManagedAttribute(description = "Whether to include stream based message body in the trace message.") 120 void setBodyIncludeStreams(boolean bodyIncludeStreams); 121 122 @ManagedAttribute(description = "Whether to include file based message body in the trace message.") 123 boolean isBodyIncludeFiles(); 124 125 @ManagedAttribute(description = "Whether to include file based message body in the trace message.") 126 void setBodyIncludeFiles(boolean bodyIncludeFiles); 127 128 @ManagedOperation(description = "Dumps the messages in xml format from the suspended breakpoint at the given node") 129 String dumpTracedMessagesAsXml(String nodeId); 130 131 @ManagedAttribute(description = "Number of total debugged messages") 132 long getDebugCounter(); 133 134 @ManagedOperation(description = "Resets the debug counter") 135 void resetDebugCounter(); 136 137 @ManagedOperation(description = "Used for validating if a given predicate is valid or not") 138 String validateConditionalBreakpoint(String language, String predicate); 139 140}