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
010     * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011     * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012     * See the License for the specific language governing permissions
013     * and limitations under the License.
014     *
015     * When distributing Covered Code, include this CDDL HEADER in each
016     * file and include the License file at
017     * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
018     * add the following below this CDDL HEADER, with the fields enclosed
019     * by brackets "[]" replaced with your own identifying information:
020     *      Portions Copyright [yyyy] [name of copyright owner]
021     *
022     * CDDL HEADER END
023     *
024     *
025     *      Copyright 2008 Sun Microsystems, Inc.
026     */
027    package org.opends.server.admin.std.server;
028    
029    
030    
031    import java.util.SortedSet;
032    import org.opends.server.admin.Configuration;
033    import org.opends.server.admin.server.ConfigurationChangeListener;
034    import org.opends.server.admin.std.meta.DebugTargetCfgDefn.DebugCategory;
035    import org.opends.server.admin.std.meta.DebugTargetCfgDefn.DebugLevel;
036    
037    
038    
039    /**
040     * A server-side interface for querying Debug Target settings.
041     * <p>
042     * Debug Targets define the types of messages logged by the debug
043     * logPublisher.
044     */
045    public interface DebugTargetCfg extends Configuration {
046    
047      /**
048       * Gets the configuration class associated with this Debug Target.
049       *
050       * @return Returns the configuration class associated with this Debug Target.
051       */
052      Class<? extends DebugTargetCfg> configurationClass();
053    
054    
055    
056      /**
057       * Register to be notified when this Debug Target is changed.
058       *
059       * @param listener
060       *          The Debug Target configuration change listener.
061       */
062      void addChangeListener(ConfigurationChangeListener<DebugTargetCfg> listener);
063    
064    
065    
066      /**
067       * Deregister an existing Debug Target configuration change listener.
068       *
069       * @param listener
070       *          The Debug Target configuration change listener.
071       */
072      void removeChangeListener(ConfigurationChangeListener<DebugTargetCfg> listener);
073    
074    
075    
076      /**
077       * Gets the "debug-category" property.
078       * <p>
079       * Specifies the debug message categories to be logged.
080       *
081       * @return Returns an unmodifiable set containing the values of the "debug-category" property.
082       */
083      SortedSet<DebugCategory> getDebugCategory();
084    
085    
086    
087      /**
088       * Gets the "debug-level" property.
089       * <p>
090       * Specifies the lowest severity level of debug messages to log.
091       *
092       * @return Returns the value of the "debug-level" property.
093       */
094      DebugLevel getDebugLevel();
095    
096    
097    
098      /**
099       * Gets the "debug-scope" property.
100       * <p>
101       * Specifies the fully-qualified OpenDS Java package, class, or
102       * method affected by the settings in this target definition. Use the
103       * number character (#) to separate the class name and the method
104       * name (that is, org.opends.server.core.DirectoryServer#startUp).
105       *
106       * @return Returns the value of the "debug-scope" property.
107       */
108      String getDebugScope();
109    
110    
111    
112      /**
113       * Gets the "include-throwable-cause" property.
114       * <p>
115       * Specifies the property to indicate whether to include the cause
116       * of exceptions in exception thrown and caught messages.
117       *
118       * @return Returns the value of the "include-throwable-cause" property.
119       */
120      boolean isIncludeThrowableCause();
121    
122    
123    
124      /**
125       * Gets the "omit-method-entry-arguments" property.
126       * <p>
127       * Specifies the property to indicate whether to include method
128       * arguments in debug messages.
129       *
130       * @return Returns the value of the "omit-method-entry-arguments" property.
131       */
132      boolean isOmitMethodEntryArguments();
133    
134    
135    
136      /**
137       * Gets the "omit-method-return-value" property.
138       * <p>
139       * Specifies the property to indicate whether to include the return
140       * value in debug messages.
141       *
142       * @return Returns the value of the "omit-method-return-value" property.
143       */
144      boolean isOmitMethodReturnValue();
145    
146    
147    
148      /**
149       * Gets the "throwable-stack-frames" property.
150       * <p>
151       * Specifies the property to indicate the number of stack frames to
152       * include in the stack trace for method entry and exception thrown
153       * messages.
154       *
155       * @return Returns the value of the "throwable-stack-frames" property.
156       */
157      int getThrowableStackFrames();
158    
159    }