Skip to content

io microsphere logging jmx LoggingMXBeanRegistrar

github-actions[bot] edited this page May 29, 2026 · 8 revisions

LoggingMXBeanRegistrar

Type: Class | Module: microsphere-logging-commons | Package: io.microsphere.logging.jmx | Since: 1.0.0

Source: microsphere-logging-commons/src/main/java/io/microsphere/logging/jmx/LoggingMXBeanRegistrar.java

Overview

The Registrar class to register all LoggingMXBean LoggingMXBeans that are adapted by Logging instances loaded from ServiceLoader.

Declaration

public abstract class LoggingMXBeanRegistrar

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.1.14-SNAPSHOT

Version Compatibility

This component is tested and compatible with the following Java versions:

Java Version Status
Java 8 ✅ Compatible
Java 11 ✅ Compatible
Java 17 ✅ Compatible
Java 21 ✅ Compatible
Java 25 ✅ Compatible

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-logging-commons</artifactId>
    <version>${microsphere-logging.version}</version>
</dependency>

Tip: Use the BOM (microsphere-logging-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.logging.jmx.LoggingMXBeanRegistrar;

API Reference

Public Methods

Method Description
registerAll Register all LoggingMXBean LoggingMXBeans that are adapted by Logging instances
registerAll Register all LoggingMXBean LoggingMXBeans that are adapted by Logging instances
register Register LoggingMXBean LoggingMXBean that is adapted by specified Logging instance.
getRegisteredLoggingObjectInstances Get all registered LoggingMXBean LoggingMXBeans as ObjectInstance instances.

Method Details

registerAll

public static List<ObjectInstance> registerAll()

Register all LoggingMXBean LoggingMXBeans that are adapted by Logging instances loaded from ServiceLoader by default ClassLoader.

registerAll

public static List<ObjectInstance> registerAll(ClassLoader classLoader)

Register all LoggingMXBean LoggingMXBeans that are adapted by Logging instances loaded from ServiceLoader by specified ClassLoader.

register

public static ObjectInstance register(Logging logging)

Register LoggingMXBean LoggingMXBean that is adapted by specified Logging instance.

getRegisteredLoggingObjectInstances

public static Set<ObjectInstance> getRegisteredLoggingObjectInstances()

Get all registered LoggingMXBean LoggingMXBeans as ObjectInstance instances.

See Also

  • LoggingMXBean
  • ServiceLoader

This documentation was auto-generated from the source code of microsphere-logging.

Clone this wiki locally