001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.opends.server.admin.std.server; 027 028 029 030import org.opends.server.admin.Configuration; 031import org.opends.server.admin.server.ConfigurationChangeListener; 032 033 034 035/** 036 * A server-side interface for querying Debug Target settings. 037 * <p> 038 * Debug Targets define the types of messages logged by the debug 039 * logPublisher. 040 */ 041public interface DebugTargetCfg extends Configuration { 042 043 /** 044 * Gets the configuration class associated with this Debug Target. 045 * 046 * @return Returns the configuration class associated with this Debug Target. 047 */ 048 Class<? extends DebugTargetCfg> configurationClass(); 049 050 051 052 /** 053 * Register to be notified when this Debug Target is changed. 054 * 055 * @param listener 056 * The Debug Target configuration change listener. 057 */ 058 void addChangeListener(ConfigurationChangeListener<DebugTargetCfg> listener); 059 060 061 062 /** 063 * Deregister an existing Debug Target configuration change listener. 064 * 065 * @param listener 066 * The Debug Target configuration change listener. 067 */ 068 void removeChangeListener(ConfigurationChangeListener<DebugTargetCfg> listener); 069 070 071 072 /** 073 * Gets the "debug-exceptions-only" property. 074 * <p> 075 * Indicates whether only logs with exception should be logged. 076 * 077 * @return Returns the value of the "debug-exceptions-only" property. 078 */ 079 boolean isDebugExceptionsOnly(); 080 081 082 083 /** 084 * Gets the "debug-scope" property. 085 * <p> 086 * Specifies the fully-qualified OpenDJ Java package, class, or 087 * method affected by the settings in this target definition. Use the 088 * number character (#) to separate the class name and the method 089 * name (that is, org.opends.server.core.DirectoryServer#startUp). 090 * 091 * @return Returns the value of the "debug-scope" property. 092 */ 093 String getDebugScope(); 094 095 096 097 /** 098 * Gets the "enabled" property. 099 * <p> 100 * Indicates whether the Debug Target is enabled. 101 * 102 * @return Returns the value of the "enabled" property. 103 */ 104 boolean isEnabled(); 105 106 107 108 /** 109 * Gets the "include-throwable-cause" property. 110 * <p> 111 * Specifies the property to indicate whether to include the cause 112 * of exceptions in exception thrown and caught messages. 113 * 114 * @return Returns the value of the "include-throwable-cause" property. 115 */ 116 boolean isIncludeThrowableCause(); 117 118 119 120 /** 121 * Gets the "omit-method-entry-arguments" property. 122 * <p> 123 * Specifies the property to indicate whether to include method 124 * arguments in debug messages. 125 * 126 * @return Returns the value of the "omit-method-entry-arguments" property. 127 */ 128 boolean isOmitMethodEntryArguments(); 129 130 131 132 /** 133 * Gets the "omit-method-return-value" property. 134 * <p> 135 * Specifies the property to indicate whether to include the return 136 * value in debug messages. 137 * 138 * @return Returns the value of the "omit-method-return-value" property. 139 */ 140 boolean isOmitMethodReturnValue(); 141 142 143 144 /** 145 * Gets the "throwable-stack-frames" property. 146 * <p> 147 * Specifies the property to indicate the number of stack frames to 148 * include in the stack trace for method entry and exception thrown 149 * messages. 150 * 151 * @return Returns the value of the "throwable-stack-frames" property. 152 */ 153 int getThrowableStackFrames(); 154 155}