< prev index next >

src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java

Print this page




  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang.management;
  27 
  28 /**
  29  * The management interface for the {@linkplain java.util.logging logging} facility.
  30  *
  31  * <p>There is a single global instance of the <tt>PlatformLoggingMXBean</tt>.
  32  * The {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
  33  * ManagementFactory.getPlatformMXBean} method can be used to obtain
  34  * the {@code PlatformLoggingMXBean} object as follows:
  35  * <pre>
  36  *     PlatformLoggingMXBean logging = ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class);
  37  * </pre>
  38  * The {@code PlatformLoggingMXBean} object is also registered with the
  39  * platform {@linkplain java.lang.management.ManagementFactory#getPlatformMBeanServer
  40  * MBeanServer}.
  41  * The {@link javax.management.ObjectName ObjectName} for uniquely
  42  * identifying the {@code PlatformLoggingMXBean} within an MBeanServer is:
  43  * <pre>
  44  *      {@link java.util.logging.LogManager#LOGGING_MXBEAN_NAME java.util.logging:type=Logging}
  45  * </pre>
  46  *
  47  * <p>The instance registered in the platform <tt>MBeanServer</tt> with
  48  * this {@code ObjectName} implements all attributes defined by
  49  * {@link java.util.logging.LoggingMXBean}.
  50  *
  51  * @since   1.7
  52  */
  53 public interface PlatformLoggingMXBean extends PlatformManagedObject {
  54 
  55     /**
  56      * Returns the list of the currently registered
  57      * {@linkplain java.util.logging.Logger logger} names. This method
  58      * calls {@link java.util.logging.LogManager#getLoggerNames} and
  59      * returns a list of the logger names.
  60      *
  61      * @return A list of {@code String} each of which is a
  62      *         currently registered {@code Logger} name.
  63      */
  64     java.util.List<String> getLoggerNames();
  65 
  66     /**
  67      * Gets the name of the log {@linkplain java.util.logging.Logger#getLevel




  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang.management;
  27 
  28 /**
  29  * The management interface for the {@linkplain java.util.logging logging} facility.
  30  *
  31  * <p>There is a single global instance of the {@code PlatformLoggingMXBean}.
  32  * The {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
  33  * ManagementFactory.getPlatformMXBean} method can be used to obtain
  34  * the {@code PlatformLoggingMXBean} object as follows:
  35  * <pre>
  36  *     PlatformLoggingMXBean logging = ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class);
  37  * </pre>
  38  * The {@code PlatformLoggingMXBean} object is also registered with the
  39  * platform {@linkplain java.lang.management.ManagementFactory#getPlatformMBeanServer
  40  * MBeanServer}.
  41  * The {@link javax.management.ObjectName ObjectName} for uniquely
  42  * identifying the {@code PlatformLoggingMXBean} within an MBeanServer is:
  43  * <pre>
  44  *      {@link java.util.logging.LogManager#LOGGING_MXBEAN_NAME java.util.logging:type=Logging}
  45  * </pre>
  46  *
  47  * <p>The instance registered in the platform {@code MBeanServer} with
  48  * this {@code ObjectName} implements all attributes defined by
  49  * {@link java.util.logging.LoggingMXBean}.
  50  *
  51  * @since   1.7
  52  */
  53 public interface PlatformLoggingMXBean extends PlatformManagedObject {
  54 
  55     /**
  56      * Returns the list of the currently registered
  57      * {@linkplain java.util.logging.Logger logger} names. This method
  58      * calls {@link java.util.logging.LogManager#getLoggerNames} and
  59      * returns a list of the logger names.
  60      *
  61      * @return A list of {@code String} each of which is a
  62      *         currently registered {@code Logger} name.
  63      */
  64     java.util.List<String> getLoggerNames();
  65 
  66     /**
  67      * Gets the name of the log {@linkplain java.util.logging.Logger#getLevel


< prev index next >