Source Code Cross Referenced for LoggingMXBean.java in  » 6.0-JDK-Core » Collections-Jar-Zip-Logging-regex » java » util » logging » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Collections Jar Zip Logging regex » java.util.logging 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025
026        package java.util.logging;
027
028        /** 
029         * The management interface for the logging facility.
030         *
031         * <p>There is a single global instance of the <tt>LoggingMXBean</tt>.
032         * This instance is an 
033         * <a href="../../lang/management/ManagementFactory.html#MXBean">MXBean</a>
034         * can be obtained by calling
035         * the {@link LogManager#getLoggingMXBean} method or from the 
036         * {@link java.lang.management.ManagementFactory#getPlatformMBeanServer
037         * platform <tt>MBeanServer</tt>} method.
038         *
039         * <p>The {@link javax.management.ObjectName ObjectName} for uniquely 
040         * identifying the <tt>LoggingMXBean</tt> within an MBeanServer is:
041         * <blockquote>
042         *    {@link LogManager#LOGGING_MXBEAN_NAME
043         *           <tt>java.util.logging:type=Logging</tt>}
044         * </blockquote>
045         *
046         * @see java.lang.management.ManagementFactory
047         *
048         * @author  Ron Mann 
049         * @author  Mandy Chung
050         * @version 1.15, 05/05/07
051         * @since   1.5
052         *
053         */
054        public interface LoggingMXBean {
055
056            /** 
057             * Returns the list of currently registered loggers. This method
058             * calls {@link LogManager#getLoggerNames} and returns a list 
059             * of the logger names.
060             * 
061             * @return A list of <tt>String</tt> each of which is a
062             *         currently registered <tt>Logger</tt> name.
063             */
064            public java.util.List<String> getLoggerNames();
065
066            /** 
067             * Gets the name of the log level associated with the specified logger.
068             * If the specified logger does not exist, <tt>null</tt> 
069             * is returned. 
070             * This method first finds the logger of the given name and 
071             * then returns the name of the log level by calling:
072             * <blockquote>
073             *   {@link Logger#getLevel Logger.getLevel()}.{@link Level#getName getName()};
074             * </blockquote>
075             *  
076             * <p>
077             * If the <tt>Level</tt> of the specified logger is <tt>null</tt>, 
078             * which means that this logger's effective level is inherited 
079             * from its parent, an empty string will be returned.
080             * 
081             * @param loggerName The name of the <tt>Logger</tt> to be retrieved.
082             *
083             * @return The name of the log level of the specified logger; or
084             *         an empty string if the log level of the specified logger
085             *         is <tt>null</tt>.  If the specified logger does not
086             *         exist, <tt>null</tt> is returned.
087             *
088             * @see Logger#getLevel
089             */
090            public String getLoggerLevel(String loggerName);
091
092            /** 
093             * Sets the specified logger to the specified new level.
094             * If the <tt>levelName</tt> is not <tt>null</tt>, the level
095             * of the specified logger is set to the parsed <tt>Level</tt>
096             * matching the <tt>levelName</tt>.
097             * If the <tt>levelName</tt> is <tt>null</tt>, the level
098             * of the specified logger is set to <tt>null</tt> and
099             * the effective level of the logger is inherited from 
100             * its nearest ancestor with a specific (non-null) level value.
101             *
102             * @param loggerName The name of the <tt>Logger</tt> to be set.
103             *                   Must be non-null.
104             * @param levelName The name of the level to set the specified logger to, 
105             *                 or <tt>null</tt> if to set the level to inherit
106             *                 from its nearest ancestor.
107             *
108             * @throws IllegalArgumentException if the specified logger 
109             * does not exist, or <tt>levelName</tt> is not a valid level name.
110             *
111             * @throws SecurityException if a security manager exists and if
112             * the caller does not have LoggingPermission("control").
113             *
114             * @see Logger#setLevel
115             */
116            public void setLoggerLevel(String loggerName, String levelName);
117
118            /**
119             * Returns the name of the parent for the specified logger.
120             * If the specified logger does not exist, <tt>null</tt> is returned. 
121             * If the specified logger is the root <tt>Logger</tt> in the namespace,
122             * the result will be an empty string.
123             *
124             * @param loggerName The name of a <tt>Logger</tt>.
125             *
126             * @return the name of the nearest existing parent logger;
127             *         an empty string if the specified logger is the root logger.
128             *         If the specified logger does not exist, <tt>null</tt> 
129             *         is returned. 
130             */
131            public String getParentLoggerName(String loggerName);
132        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.